#26540 [Opn->Bgs]: Basic Sixtax : php close tag "?>" missunderstood when it's in a commented line

From: Date: Sat, 06 Dec 2003 16:47:50 +0000
Subject: #26540 [Opn->Bgs]: Basic Sixtax : php close tag "?>" missunderstood when it's in a commented line
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969357212@lists.php.net to get a copy of this message
ID: 26540 Updated by: derick@php.net Reported By: putaso at nospam dot com -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: w2k PHP Version: 4.3.3 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php RTFM, see: http://docs.php.net/en/language.basic-syntax.html#language.basic-syntax.phpmode Previous Comments: ------------------------------------------------------------------------ [2003-12-06 08:44:12] putaso at nospam dot com 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 this bug report at http://bugs.php.net/?id=26540&edit=1

« previous php.doc (#969357212) next »