The scanner is looking for \r \n % if ASP tags are enabled or ?> before it marks the end of the comment.
Take the following <?php echo 'PHP'; // echo $moo; ?> I am HTML, hear me roar! Parsing ends with ?> regardless if its a comment or not but its not context sensitive. It can't understand that its within a string. - S On Jul 7, 2010, at 7:26 PM, Shijiang wrote: > Hi > I'm not sure whether it's really a bug. > The following sample code will emit a parse error. > <?php > if(true){ > //echo '<?php date('Y-m-d H:i:s'); ?>'; > echo 'afafa'; > } > ?> > > The parser treate the PHP tag within the commented line as a normal tag . > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php