From:             tomc at wanadoo dot fr
Operating system: Windows XP
PHP version:      4CVS-2005-01-23 (stable)
PHP Bug Type:     Output Control
Bug description:  one-line comment behave differently with </script> closing tag

Description:
------------
in the manual :
"The one-line comment styles actually only comment to the end of the line
or the current block of PHP code, whichever comes first."

Everything is working as described in the manual except that if you are
using the </script> closing tag, PHP will consider the end of the PHP
block as part of the comment.

Reproduce code:
---------------
<?php // line comment ?>
echo "out of PHP"
<? // line comment ?>
echo "out of PHP"
<% // line comment %>
echo "out of PHP"
<script language="php">// line comment</script>
echo "how come I'm still in PHP ?\n" ;
</script>
echo "out of PHP"

Expected result:
----------------
echo "out of PHP"
echo "out of PHP"
echo "out of PHP"
echo "how come I'm still in PHP ?\n" ;
echo "out of PHP"

Actual result:
--------------
echo "out of PHP"
echo "out of PHP"
echo "out of PHP"
how come I'm still in PHP ?
echo "out of PHP"

-- 
Edit bug report at http://bugs.php.net/?id=31672&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31672&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31672&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31672&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31672&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31672&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31672&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31672&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31672&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31672&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31672&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31672&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31672&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31672&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31672&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31672&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31672&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31672&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31672&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31672&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31672&r=mysqlcfg

Reply via email to