Bug #17078: return does not terminate included script

From: Date: Tue, 07 May 2002 17:39:26 +0000
Subject: Bug #17078: return does not terminate included script
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-7158@lists.php.net to get a copy of this message
From:             kevin.laushway@nlc-bnc.ca
Operating system: Dec Alpha OSF1 v5.1
PHP version:      4.2.0
PHP Bug Type:     Scripting Engine problem
Bug description:  return does not terminate included script

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 bug report at http://bugs.php.net/?id=17078&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=17078&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=17078&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=17078&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=17078&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17078&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=17078&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=17078&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=17078&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=17078&r=globals



Thread (6 messages)

« previous php.bugs (#7158) next »