PHP 4.0 Bug #9467: parse error when closing function in require()/include() file

From: Date: Mon, 26 Feb 2001 19:35:48 +0000
Subject: PHP 4.0 Bug #9467: parse error when closing function in require()/include() file
Groups: php.dev 
Request: Send a blank email to php-dev+get-47576@lists.php.net to get a copy of this message
From: danielc@analysisandsolutions.com Operating system: NT 4.0 sp 6a PHP version: 4.0.4pl1 PHP Bug Type: Scripting Engine problem Bug description: parse error when closing function in require()/include() file Hi: A parse error arises if a function was opened in the main file and closed in a require()'d or include()'d file. I'm actually using PHP 4.0.5-dev for windows, 2001-02-20. This problem also existed in 4.0.4-dev. Note, the problem does not happen in PHP 3.0.16. Here are the test scripts: ========== req-test.php ================ <?php function Tester() { include('./req-test.inc'); # Note, the function has its closing # "}" inside the required file. echo '<p>hi there from the main file</p>'; Tester(); ?> ======================================== ========== req-test.inc ================ <?php # This is still inside the function. echo '<p>Hi there from inside the function'; echo ' that is continued inside the required file</p>'; }# End function Tester ?> ======================================== Thanks, --Dan -- Edit Bug report at: http://bugs.php.net/?id=9467&edit=1

« previous php.dev (#47576) next »