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

From: Date: Tue, 10 Jul 2001 21:32:35 +0000
Subject: Bug #4294 Updated: return in script called from php.ini stops engine
References: 1  Groups: php.dev php.doc 
Request: Send a blank email to php-dev+get-59626@lists.php.net to get a copy of this message
ID: 4294 Updated by: jeroen Reported By: frip@bigfoot.com Status: Analyzed Bug Type: Documentation problem Operating System: AIX 4.3 / Solaris 2.6 PHP Version: 4.0 Release Candidate 1 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ [2000-07-23 14:20:20] stas@cvs.php.net Please provide short reproducing script. ------------------------------------------------------------------------ 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 ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=4294&edit=1

« previous php.dev (#59626) next »