Bug #12452 Updated: Parsing error in eval function

From: Date: Thu, 18 Oct 2001 19:44:01 +0000
Subject: Bug #12452 Updated: Parsing error in eval function
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-68268@lists.php.net to get a copy of this message
ID: 12452 Updated by: sander Reported By: paul@myitcv.org.uk Old Status: Open Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux 2.4.3 (Mandrake) PHP Version: 4.0.6 New Comment: Not a bug in PHP. Short tags (<?) are known to cause problems with XML. You should disable them. Previous Comments: ------------------------------------------------------------------------ [2001-07-28 20:53:07] paul@myitcv.org.uk Using a "buffer" variable to collect HTML output as the script progresses, at the end of the script using eval to output (and parse) the buffer. However, first line of ouput is as follows: <?xml version="1.0" encoding="UTF-8"?> This causes a parse error; I would guess this is because PHP is not strict on the text that follows <?, hence the fact that it is xml does not register and it gives (as expected) a parse error. Surely this should not cause a parse error. A similar script to the part I use is included below: <?php $page_output="<?xml ..... ?><html><head>.........</html>"; eval("?>$page_output"); ?> ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12452&edit=1

« previous php.dev (#68268) next »