What is the difference between die and exit in php? The two seem to both terminate the program execution, and it seems that there is no difference indeed. some people say that they can take a bubble before they die, but they will not. after reading the manual, it seems that exit can also output something.
What is the difference between die and exit in php?
Both of them seem to be terminating program execution, and they seem to be different.
GOOGLE, some people say that one can take a bubble before they die, and the other can't
After reading the manual, it seems that exit can also output something.
Void exit ([string status]);
Note: As this is a language structure rather than a function, exit cannot be called by variable functions.
It's dead, even if it can be handed over to other variables or functions.
There is a description about die.
Die -- Equivalent to exit ()
It seems that there is no difference between die and exit in php.