Bug #17432 Updated: PHP ignores a exit-command

From: Date: Sun, 26 May 2002 09:16:19 +0000
Subject: Bug #17432 Updated: PHP ignores a exit-command
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-8577@lists.php.net to get a copy of this message
ID: 17432 Updated by: mfischer@php.net Reported By: e05@slashdot.ch Status: Bogus Bug Type: Scripting Engine problem Operating System: Microsoft Windows 2000 SP2 PHP Version: 4.2.1 New Comment: It's not "illogical". It's simply the way it works and won't change, you'll have to live with it. Scripts are completely parsed *before* they're executed. That's a fact. If the script can't be parsed, it can't be executed. Calling missing function is something else, it's a run-time behaviour, that's why this works. Previous Comments: ------------------------------------------------------------------------ [2002-05-26 05:15:58] derick@php.net A undefined functionis not a _parse_ error. Function names are evaluated at runtime in the Zend engine (well, uh, sometimes :), so it's quite logical from a techincal point of view. Derick ------------------------------------------------------------------------ [2002-05-26 05:12:57] correction@nospam.please I think it´s illogical. Why? If you call an function which doesn´t exists, it works. ------------------------------------------------------------------------ [2002-05-26 05:09:09] e05@slashdot.ch I think it´s illogical. Why? If you call an function which doesn´t exists, it works. ------------------------------------------------------------------------ [2002-05-26 04:09:04] derick@php.net A SCript is parse before it is executed. If it can not be parsed correctly due to a parse error, it will not get executed at all, and thus your exit(1) call has no effect here. Not a bug -> bogus ------------------------------------------------------------------------ [2002-05-26 03:34:48] e05@slashdot.ch I wrote a script with an error, and to ignore it I write an exit-command before. But PHP ignores it. A script that shows this bug: <?php phpinfo(); exit(1); if( phpinfo(); ?> -- My configuration: Apache 1.3.24 (win32-build from httpd.apache.org) PHP 4.2.1 (offical win32 build) PHP runs as Apache module. -- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17432&edit=1

« previous php.bugs (#8577) next »