Bug #17078 Updated: return does not terminate included script

From: Date: Mon, 17 Jun 2002 13:15:34 +0000
Subject: Bug #17078 Updated: return does not terminate included script
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10860@lists.php.net to get a copy of this message
ID: 17078 Updated by: mfischer@php.net Reported By: kevin.laushway@nlc-bnc.ca -Status: Open +Status: Closed Bug Type: Scripting Engine problem Operating System: Dec Alpha OSF1 v5.1 PHP Version: 4.2.0 Previous Comments: ------------------------------------------------------------------------ [2002-05-08 09:22:42] kevin.laushway@nlc-bnc.ca I upgraded apache to 1.3.24 and the problem is resolved. ------------------------------------------------------------------------ [2002-05-07 15:06:14] mfischer@php.net Thanks, please also try the cgi version. ------------------------------------------------------------------------ [2002-05-07 15:03:26] kevin.laushway@nlc-bnc.ca After futher investigation it seems only to happen with a when running under apache (version 1.3.22). I'm installing a later version of apache. I will continue with my investigation. ------------------------------------------------------------------------ [2002-05-07 14:57:41] mfischer@php.net I'm unable to reproduce this on linux: $ cat a.php <? echo "In file a\n"; $include = include 'b.php'; echo "In file a, after file b returned\n"; ?> $ cat b.php <? echo "In file b\n"; return; echo "Still in file b\n"; ?> $ php-4.0.6 -f a.php In file a In file b In file a, after file b returned $ php-4.2.1RC2 -f a.php In file a In file b In file a, after file b returned Can someone test this with those version on win32? Could this by chance be a configuration issue of your php installation? ------------------------------------------------------------------------ [2002-05-07 13:39:26] kevin.laushway@nlc-bnc.ca A return does not terminate execution of included script. For Example; parent.php <?php echo "Starting Parent\n"; $m_return = include('./child.php'); echo "Back from Child, return code $m_return\n"; ?> child.php <?php echo "Starting Child\n"; return; // this should terminate script echo "What the heck? I'm still in child\n"; ?> I expect the script to terminate at the return, and "what the heck..." would never be printed. This functioned as expected in previous versions. i.e. 4.0.6 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17078&edit=1

« previous php.bugs (#10860) next »