ID: 24226
Updated by: [EMAIL PROTECTED]
Reported By: stephane dot drouard at st dot com
-Status: Open
+Status: Bogus
-Bug Type: *Compile Issues
+Bug Type: *General Issues
Operating System: Lunix
PHP Version: 4.3.2
New Comment:
It might not be clear right away but this is how it's seen
by PHP:
<?
class test {
;
function test() {
print 'OK';
}
}
>From the manual,
http://www.php.net/manual/en/language.basic-syntax.php
"The closing tag for the block will include the immediately trailing
newline if one is present. Also, the closing tag automatically implies
a semicolon; you do not need to have a semicolon terminating the last
line of a PHP block."
Previous Comments:
------------------------------------------------------------------------
[2003-06-17 10:17:06] stephane dot drouard at st dot com
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 this bug report at http://bugs.php.net/?id=24226&edit=1