note 98124 deleted from function.exit by danbrown

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: anon 

----

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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.