#24226 [NEW]: Can't close then reopen a PHP script within class definition

From: Date: Tue, 17 Jun 2003 15:17:06 +0000
Subject: #24226 [NEW]: Can't close then reopen a PHP script within class definition
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-42133@lists.php.net to get a copy of this message
From: stephane dot drouard at st dot com Operating system: Lunix PHP version: 4.3.2 PHP Bug Type: *Compile Issues Bug description: Can't close then reopen a PHP script within class definition Description: ------------ I'm using Dreamweaver and it handles editable regions by inserting HTML comments. To do so within PHP code, we need to close the script and to reopen it after. It works fine within functions (including class functions), loops, if, ... The only case (I identified) that does not work is within class definitions. Reproduce code: --------------- <? class test { ?> <!-- comment --> <? function test() { print 'OK'; } } ?> Expected result: ---------------- It should compile Actual result: -------------- Parse error: parse error, expecting T_OLD_FUNCTION' or T_FUNCTION' or T_VAR' or '}'' in <file> on line 3 -- Edit bug report at http://bugs.php.net/?id=24226&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24226&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24226&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24226&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24226&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24226&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24226&r=support Expected behavior: http://bugs.php.net/fix.php?id=24226&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24226&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24226&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24226&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24226&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24226&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24226&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24226&r=gnused

« previous php.bugs (#42133) next »