php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31211 Remark bug
Submitted: 2004-12-20 23:25 UTC Modified: 2004-12-21 11:54 UTC
From: pulstar at ig dot com dot br Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.3.9 OS: Linux Debian
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pulstar at ig dot com dot br
New email:
PHP Version: OS:

 

 [2004-12-20 23:25 UTC] pulstar at ig dot com dot br
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? "; ?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-21 00:20 UTC] derick@php.net
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

Read the manual on comments.
 [2004-12-21 11:54 UTC] pulstar at ig dot com dot br
Well... In this case, can I add an user comment in the manual?  :-)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 14:01:29 2024 UTC