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

From: Date: Fri, 02 Jun 2017 14:43:30 +0000
Subject: Bug #74692 [Opn->Nab]: ?> is evaluated when commented with // but not when between /* and */
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209366@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74692&edit=1 ID: 74692 Updated by: peehaa@php.net Reported by: webmaster at krahs-emag dot com Summary: ?> is evaluated when commented with // but not when between /* and */ -Status: Open +Status: Not a bug Type: Bug Package: Scripting Engine problem Operating System: Linux PHP Version: 7.0.19 Block user comment: N Private report: N New Comment: http://php.net/manual/en/language.basic-syntax.comments.php 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 Previous Comments: ------------------------------------------------------------------------ [2017-06-02 14:35:47] webmaster at krahs-emag dot com 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 this bug report at https://bugs.php.net/bug.php?id=74692&edit=1

« previous php.bugs (#209366) next »