ID:               16948
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: WinNT 4, IRIX64 vega 6.5 07091
 PHP Version:      4.1.2
 New Comment:

Thank you for looking into this, and I did miss this in the manual. 
However it was working fine for a long time with the previous version. 
After some thought I realized that my original note was incorrect in a
minor but significant way...the file had the ASP-style tags commented
out ("%>").  I changed that to the "?>" tags and of course saw the same
"problem."  So perhaps 4.0.6 stopped at all tags except the ASP-style
tags.  In any case it sounds like it is a bogus report for 4.1.2,
sorry.


Previous Comments:
------------------------------------------------------------------------

[2002-05-02 09:00:03] [EMAIL PROTECTED]

Marking as Bogus.

-Tal

------------------------------------------------------------------------

[2002-05-01 15:00:45] [EMAIL PROTECTED]

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] [EMAIL PROTECTED]

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

Reply via email to