Bug #74692 [NEW]: ?> is evaluated when commented with // but not when between /* and */

From: Date: Fri, 02 Jun 2017 14:35:49 +0000
Subject: Bug #74692 [NEW]: ?> is evaluated when commented with // but not when between /* and */
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209365@lists.php.net to get a copy of this message
From:             webmaster at krahs-emag dot com
Operating system: Linux
PHP version:      7.0.19
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:?> is evaluated when commented with // but not when between /* and */

Description:
------------
Having ?> appear within a comment indicted by // will cause the ?> to be
evaluated and the script will stop whereas within a /* */ it will not

Test script:
---------------
The following line will evaluate the '?>' as closing the PHP tag
// print "<?xml version='1.0' encoding='UTF-8'?>";

Doing the below instead will correctly comment it.
/* print "<?xml version='1.0' encoding='UTF-8'?>"; */

Expected result:
----------------
Both methods should comment correctly ignore the contents.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=74692&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=74692&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=74692&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=74692&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=74692&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=74692&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=74692&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=74692&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=74692&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=74692&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=74692&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=74692&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=74692&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=74692&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74692&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=74692&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=74692&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=74692&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74692&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=74692&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=74692&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#209365) next »