Bug #60777 [Opn]: bug in parsing one line comment
| From: | giguet at ens dot fr | Date: | Tue, 17 Jan 2012 15:34:35 +0000 |
| Subject: | Bug #60777 [Opn]: bug in parsing one line comment | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-166548@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60777&edit=1
ID: 60777
User updated by: giguet at ens dot fr
Reported by: giguet at ens dot fr
Summary: bug in parsing one line comment
Status: Open
Type: Bug
Package: *General Issues
Operating System: linux squeeze
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
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 ?>
Previous Comments:
------------------------------------------------------------------------
[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