php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12452 Parsing error in eval function
Submitted: 2001-07-28 20:53 UTC Modified: 2001-10-18 15:44 UTC
From: paul at myitcv dot org dot uk Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.6 OS: Linux 2.4.3 (Mandrake)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: paul at myitcv dot org dot uk
New email:
PHP Version: OS:

 

 [2001-07-28 20:53 UTC] paul at myitcv dot org dot 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");
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-18 15:44 UTC] sander@php.net
Not a bug in PHP. Short tags (<?) are known to cause problems with XML. You should disable them.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 29 00:01:31 2024 UTC