Edit report at https://bugs.php.net/bug.php?id=60777&edit=1
ID: 60777 Updated by: m...@php.net Reported by: giguet at ens dot fr Summary: bug in parsing one line comment -Status: Open +Status: Bogus Type: Bug Package: *General Issues Operating System: linux squeeze PHP Version: Irrelevant Block user comment: N Private report: N New Comment: But you end the current PHP block with ?>. The parser doesn't care that the code in the comment would be valid. Previous Comments: ------------------------------------------------------------------------ [2012-01-17 15:34:35] giguet at ens dot fr In my script this is a one line comment style and it does not comment to the end of the line. If it was the case, php would not display the ;' following ?> ------------------------------------------------------------------------ [2012-01-17 13:46:41] laruence at gmail dot com bogus, The "one-line" comment styles only comment to the end of the line or the current block of PHP code, see http://www.php.net/manual/en/language.basic-syntax.comments.php ------------------------------------------------------------------------ [2012-01-17 13:40:01] giguet at ens dot fr Description: ------------ When the two character-string ?> is present in a one-line // comment php interprets the rest of the line as php code. PHP 5.3.3-7+squeeze3 with Suhosin-Patch (cli) (built: Jun 28 2011 08:24:40) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH Test script: --------------- <?php // echo '?>'; ?> Actual result: -------------- '; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60777&edit=1