php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4178 <?xml needed in XHTML
Submitted: 2000-04-18 09:36 UTC Modified: 2000-04-21 11:43 UTC
From: sven at pressflex dot com Assigned:
Status: Closed Package: Other
PHP Version: 3.0.14 OS: Linux 2.2.13
Private report: No CVE-ID: None
 [2000-04-18 09:36 UTC] sven at pressflex dot com
W3C's XHTML suggests the first line of your document look something like:

<?xml version="1.0" encoding="UTF-8"?>

But in PHP is tries to read that as PHP code.

The work around is to use PHP to print the header, but it would be much better to not to have to.

I would like the solution to be that <? doesn't break from HTML, only <?php but that will probably break a lot of old code.  But I would be very happy if <?xml didn't break away to HTML, and then please make <? w/o the PHP deprecated.

See:

http://www.w3.org/TR/1998/REC-xml-19980210#NT-PI

for the exact spec of what is needed.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-04-21 11:39 UTC] joey at cvs dot php dot net
Turn off short tags in your ini file.
Then you have to use <?php for PHP to begin processing,
instead of <?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 19:01:30 2024 UTC