note 50433 added to function.exit
| From: | kang at respice dot de | Date: | Mon, 28 Feb 2005 15:59:36 +0000 |
| Subject: | note 50433 added to function.exit | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85664@lists.php.net to get a copy of this message | ||
I noticed, that exit () and die () really do not cause an instant end of the script.
The following script:
<?php
class Test
{
function __destruct ()
{
die ('AGAIN');
}
}
$Test = new Test;
die ('DIE');
?>
will display DIEAGAIN
----
Manual Page -- http://www.php.net/manual/en/function.exit.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50433
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50433&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50433&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50433&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50433&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50433&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50433&report=yes
Search -- http://master.php.net/manage/user-notes.php