Bug #16948 Updated: include interprets commented php tags
| From: | tal@php.net | Date: | Thu, 02 May 2002 13:00:03 +0000 |
| Subject: | Bug #16948 Updated: include interprets commented php tags | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-6726@lists.php.net to get a copy of this message | ||
ID: 16948
Updated by: tal@php.net
Reported By: steve@teamITS.com
-Status: Closed
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: WinNT 4, IRIX64 vega 6.5 07091
PHP Version: 4.1.2
New Comment:
Marking as Bogus.
-Tal
Previous Comments:
------------------------------------------------------------------------
[2002-05-01 15:00:45] derick@php.net
This is not a bug, see the manual:
http://www.php.net/manual/en/language.basic-syntax.comments.php
it says:
The "one-line" comment styles actually only comment to the end of the
line or the current block of PHP code, whichever comes first.
and ?> is the end of a php block, so it drops out of PHP mode there and
continues in HTML mode.
AFAIK this also worked like this in 4.0.6 (and always in 4.x).
Derick
------------------------------------------------------------------------
[2002-05-01 14:53:47] steve@teamITS.com
I have a few PHP files that have a common header and footer which I
pull in using an include(). After our web host upgraded from 4.0.6 to
4.1.2 I realized that include() was not working properly.
My included file had a section with PHP tags that was commented out,
like:
//<?php
//echo "hello";
//?>
echo "hello2";
4.0.6 would ignore these, but 4.1.2 ignores that there is a comment
marker, and ends the PHP interpreter in the comment line, sending the
'echo "hello2";' and remaining code as TEXT to the browser. I am not
sure if this qualifies as a bug but is definitely different that the
behavior of 4.0.6 which ignored all commented lines.
I have duplicated this on a Windows NT 4 server also.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16948&edit=1