Which function is used for terminate the script execution in PHP?

Started by hirephp, 05-23-2012, 05:41:48

Previous topic - Next topic

hirephpTopic starter

Which function is used for terminate the script execution in PHP?




Website Designer | Hire Website Designer visit hirephp.com



Hire PHP Coder [nofollow] | Hire PHP Developer [nofollow]
  •  


thelazytrader

die and exit functions both are using to terminate the script in php.


Luca tall


1. break()
2. quit()
3. die()
These are the functions used for terminating the script execution in PHP.

keith.bowman

The following function are used for terminate the script execution in PHP
1)   Quit()
2)   Break()
3)   Die()
Asuem Infotech [nofollow]
  •  

qx_1789

die() is just an alias for exit() so there is absolutely no difference in how to use it or what it does.

So die() is not only equivalent to exit(), it is actually the exact same function just with a different name.
You should use exit function to terminate the script execution in php.

Learn more about php from learnwebdevelopment.info