Home >Backend Development >PHP Tutorial >php中die和exit的有什么区别?

php中die和exit的有什么区别?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 14:24:561006browse

两个好像都是终止程序执行,貌似的确没有不同

GOOGLE了一下有人说一个是死之前还能冒个泡,一个不会

翻了一下手册,好像exit也是可以输出东西的

void exit ( [string status] );

但是关于exit有一个注释:注意: 由于这是一个语言结构而非函数,因此它无法被变量函数调用。

已经死掉了,就算能交给其他变量或者函数也没有用了啊

关于die有一段说明

die -- Equivalent to exit()

看来,php中die和exit的确没有区别。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn