Xu Wei Jie Posted March 27, 2009 Share Posted March 27, 2009 I am not sure whether to use die or exit in my implementation. Which one would be more appropriate and how does each command work in the background? Link to comment https://forums.phpfreaks.com/topic/151352-what-is-the-difference-between-die-and-exit-in-php/ Share on other sites More sharing options...
Mchl Posted March 27, 2009 Share Posted March 27, 2009 Did you read what manual says about die? Link to comment https://forums.phpfreaks.com/topic/151352-what-is-the-difference-between-die-and-exit-in-php/#findComment-794937 Share on other sites More sharing options...
Xu Wei Jie Posted March 27, 2009 Author Share Posted March 27, 2009 Yes I read it but the manual is not very detailed as in how it differs from exit. It says the same but I am sure they don't implement 2 commands for nothing Link to comment https://forums.phpfreaks.com/topic/151352-what-is-the-difference-between-die-and-exit-in-php/#findComment-794939 Share on other sites More sharing options...
Mchl Posted March 27, 2009 Share Posted March 27, 2009 Apparently they did Another very important construct is die(), which is itself an alias of exit(). It allows you to terminate the script’s output and either output a string or return a numeric status to the process that called the script. Link to comment https://forums.phpfreaks.com/topic/151352-what-is-the-difference-between-die-and-exit-in-php/#findComment-794942 Share on other sites More sharing options...
PFMaBiSmAd Posted March 27, 2009 Share Posted March 27, 2009 There are many function aliases in php, due to how the language has evolved, evolve and get over it as well - http://www.php.net/manual/en/aliases.php Link to comment https://forums.phpfreaks.com/topic/151352-what-is-the-difference-between-die-and-exit-in-php/#findComment-794944 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.