From: putaso at nospam dot com Operating system: w2k PHP version: 4.3.3 PHP Bug Type: Documentation problem Bug description: Basic Sixtax : php close tag "?>" missunderstood when it's in a commented line
Description: ------------ Hello, i was posing this as a Zend Engine problem, but then i found out that other people reported the same bug, and it seems that it's not gonna be fixed soon, so since i took the time to report this bug i am sendin it to you in order to see if you can explain this in the documentation: Other people reported this misbehaviour: - http://www.php.net/manual/en/language.basic-syntax.comments.php (20-Jan-2003 03:41) - http://bugs.php.net/bug.php?id=5123&edit=2 - http://bugs.php.net/bug.php?id=6053&edit=2 here's my bug: thanks.. ------------------------------------------------------ I am working with Regular Expressions, and i use the follwing one: /(.*(?>/?)>)/s note the "?>" chars. The regular expression is interpreted ok.. but the problem is the following.. If i comment that line, the php engine reads it and thin i am using this as a php close tag. if i do: <?php $regular_expression = "/(.*(?>/?)>)/s"; echo $regular_expression; ?> i get printed : /(.*(?>/?)>)/s but... if i comment the line with the regular expression that includes "?>", : Reproduce code: --------------- <?php //$regular_expression = "/(.*(?>/?)>)/s"; $regular_expression = "/.*/s"; echo $regular_expression; // from here on php is not code being iterpreted echo("\n\nhello world, is this a bug?"); exit; echo "Didn't we exit?"; //bye ?> Expected result: ---------------- /.*/s hello world, is this a bug? Actual result: -------------- /?)>)/s"; $regular_expression = "/.*/s"; echo $regular_expression; // from here on php is not code being iterpreted echo("\n\nhello world, is this a bug?"); exit; echo "Didn't we exit?"; //bye ?> -- Edit bug report at http://bugs.php.net/?id=26540&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26540&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26540&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26540&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26540&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26540&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26540&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26540&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26540&r=support Expected behavior: http://bugs.php.net/fix.php?id=26540&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26540&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26540&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26540&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26540&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26540&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26540&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26540&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26540&r=float
