| Newsgroups |
php.notes |
| Message-ID |
<[email protected]> |
Be aware that die("something") and exit("something") causes an exit status of 0 (zero), which is very relevant if you're writing CLI scripts. I, for once, made a mistake in an authorization php script whose exit status determines if a user is allowed or not, and it contained - among other things - a die('sql server error'). This caused an exit status of 0 = user was allowed.
I think, at the very least, this behavior should be explicitly documented.
----
Server IP: 213.249.64.162
Probable Submitter: 193.172.134.195
----
Manual Page -- http://www.php.net/manual/en/function.exit.php
Edit -- https://master.php.net/note/edit/98124
Del: integrated -- https://master.php.net/note/delete/98124/integrated
Del: useless -- https://master.php.net/note/delete/98124/useless
Del: bad code -- https://master.php.net/note/delete/98124/bad+code
Del: spam -- https://master.php.net/note/delete/98124/spam
Del: non-english -- https://master.php.net/note/delete/98124/non-english
Del: in docs -- https://master.php.net/note/delete/98124/in+docs
Del: other reasons-- https://master.php.net/note/delete/98124
Reject -- https://master.php.net/note/reject/98124
Search -- https://master.php.net/manage/user-notes.php