note 35236 deleted from function.exit by nlopess

From: Date: Tue, 27 Apr 2004 13:40:31 +0000
Subject: note 35236 deleted from function.exit by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-68883@lists.php.net to get a copy of this message
Note Submitter: Maxg Network ---- Just a note on the behaviour of the exit and die statments. If you pass an argument, it is supposed to be displayed before the script stops. However, when you pass an integer or a variable containing an integer, it will be considered as a exit code and will *not* be displayed. On the other hand, if you pass a float number, it will be displayed. <?php $some_integer = -8; die($some_integer); // displays nothing die(8); // Not more die("Value : ".$some_integer); // Works die((string)$some_integer); // Works as well ?>

« previous php.notes (#68883) next »