I’m still on a PHP learning curb. When terminating a script, what is the difference between exit(), die(); and return;?:
- within the same file (Single script file)
- Within the child of an include
- Within the parent of an include
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Return returns a value. This can be anything and is meant for functions.
What are the differences in die() and exit() in PHP?
http://php.net/manual/en/function.return.php