Bug #4294 Updated: return in script called from php.ini stops engine

From: Date: Mon, 14 Jan 2002 00:06:08 +0000
Subject: Bug #4294 Updated: return in script called from php.ini stops engine
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-76942@lists.php.net to get a copy of this message
ID: 4294 Updated by: torben Reported By: frip@bigfoot.com Status: Closed Bug Type: Documentation problem Operating System: AIX 4.3 / Solaris 2.6 PHP Version: 4.0 Release Candidate 1 Assigned To: torben New Comment: Fixed in CVS. Previous Comments: ------------------------------------------------------------------------ [2001-07-10 17:32:35] jeroen@php.net This is a side-effect of the way zend handles things: almost everything is treated as a kind of function. include()ed files, eval()ed code, and also auto_prepended files. This is sometimes useful, (return from an included library file for example when something is detected). Anyway, this should be documented. Adding to the phpdoc/TODO ------------------------------------------------------------------------ [2000-08-19 10:39:13] waldschrott@php.net return() is defined now in prepend/append files, but isn´t documented too... ------------------------------------------------------------------------ [2000-08-19 10:36:52] waldschrott@php.net well in fact it´s nowhere document what return() exactly does, it seems to be possible to halt the whole script from the gloabal scope be putting return() in it, I don´t know whether this is intended (I think it shouldn´t be possible to leave the global scope with it, perhaps a e_notice or warning) ------------------------------------------------------------------------ [2000-08-19 10:29:26] waldschrott@php.net -- main script -- <?php echo "This is the end of the script"; ?> -- prepend -- <?php return; ?> ------------------------------------------------------------------------ [2000-08-18 13:06:32] waldschrott@php.net Closed due to missing user feedback. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=4294 Edit this bug report at http://bugs.php.net/?id=4294&edit=1

« previous php.dev (#76942) next »