#25987 [NEW]: php and xml tag confusion
From: tkwright at comcast dot net
Operating system: windows 98
PHP version: 4.3.3
PHP Bug Type: Scripting Engine problem
Bug description: php and xml tag confusion
Description:
------------
when an xml 'starting' tag is placed on an document, php confuses it with
its opining and closing tag.
it confuses its closing tag with xml end of the tag, and php confuses the
open tag for php with the start of the tag declaring an xml document.
Parse error: parse error, unexpected T_STRING in c:/apache/htdocs/xml.php
on line 1
currently, the workaround is:
<?php echo'<'.'?'.'x'.'m'.'l
vers'.'ion="1'.'.'.'0'.'"
en'.'codi'.'ng="UT'.'F-8'.'"'.'?'.'>'."\n";?>
Reproduce code:
---------------
<?xml version="1.0" encoding="UTF-8"?>
Expected result:
----------------
[no error],rest of page
Actual result:
--------------
Parse error: parse error, unexpected T_STRING in c:/apache/htdocs/xml.php
on line 1
--
Edit bug report at http://bugs.php.net/?id=25987&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25987&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25987&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25987&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25987&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25987&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25987&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25987&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25987&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25987&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25987&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25987&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25987&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25987&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25987&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25987&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25987&r=float
Thread (15 messages)
- tkwright at comcast dot net
- tkwright_233 at hotmail dot com#25987 [Opn]: php and xml tag confusion
- helly@php.net#25987 [Opn->Bgs]: php and xml tag confusion
- tkwright_233 at hotmail dot com#25987 [Bgs]: php and xml tag confusion
- helly@php.net#25987 [Bgs]: php and xml tag confusion
- tkwright_233 at hotmail dot com#25987 [Bgs]: php and xml tag confusion
- tkwright_233 at hotmail dot com#25987 [Bgs]: php and xml tag confusion
- gschlossnagle@php.net#25987 [Bgs]: php and xml tag confusion
- tkwright_233 at hotmail dot com#25987 [Bgs]: php and xml tag confusion
- tkwright_233 at hotmail dot com#25987 [Bgs]: php and xml tag confusion
- helly@php.net#25987 [Bgs]: php and xml tag confusion
- tkwright_233 at hotmail dot com#25987 [Bgs]: php and xml tag confusion
- sniper@php.net#25987 [Bgs]: php and xml tag confusion
- tkwright_233 at hotmail dot com#25987 [Bgs]: php and xml tag confusion
- danielc at analysisandsolutions dot com#25987 [Com]: php and xml tag confusion