|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-21 00:20 UTC] derick@php.net
[2004-12-21 11:54 UTC] pulstar at ig dot com dot br
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 24 02:00:01 2025 UTC |
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? "; ?>