note 98124 deleted from function.exit by danbrown

From: Date: Thu, 27 May 2010 15:54:05 +0000
Subject: note 98124 deleted from function.exit by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-169659@lists.php.net to get a copy of this message
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.

« previous php.notes (#169659) next »