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? Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.