From:             pulstar at ig dot com dot br
Operating system: Linux Debian
PHP version:      4.3.9
PHP Bug Type:     Reproducible crash
Bug description:  Remark bug

Description:
------------
May be is a problem with remark (//) and PHP tags (<?php ?>), I don't
know. PHP thinks that the ?> inside a string define the last PHP code in
the page when the line is commented. But it is not. When the line is
uncommented, it works fine.


Reproduce code:
---------------
<?php

$my_template=chr(63)."><html>
<head><title>Test</title></head>
<body>
{content}
</body>
</html>";

//echo eval(str_replace("{content}","<?php echo phpinfo();
?>",$my_template));

echo " With this example you can see some of the PHP code in the browser.
";
echo " But, if you uncomment the line above, it will work fine. Why? ";

?>

Expected result:
----------------
PHP Version 4.3.9

*** all phpinfo() data here ***

With this example you can see some of the PHP code in the browser. But, if
you uncomment the line above, it will work fine. Why? 


Actual result:
--------------
",$my_template)); echo " With this example you can see some of the PHP
code in the browser. "; echo " But, if you uncomment the line above, it
will work fine. Why? "; ?>


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

Reply via email to