Bug #72556 [Opn->Nab]: php using .xml file as source tries to execute header

From: Date: Wed, 06 Jul 2016 20:08:37 +0000
Subject: Bug #72556 [Opn->Nab]: php using .xml file as source tries to execute header
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202108@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72556&edit=1 ID: 72556 Updated by: cmb@php.net Reported by: jim dot michaels at Jesusnjim dot com Summary: php using .xml file as source tries to execute header -Status: Open +Status: Not a bug Type: Bug Package: Scripting Engine problem PHP Version: 7.0Git-2016-07-06 (snap) -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php > 7.1Git-2016-07-06 isn't even on your site - no dir for it. php.net does not package Git snapshots, as you can easily get them yourself, see <http://php.net/git.php>. > php using .xml file as source tries to execute XML header > because of <? and ?> but xml header says <?xml version='1.0' > encoding='UTF-8'?> If you don't like that behavior, just disable short_open_tag, see <http://php.net/manual/en/ini.core.php#ini.short-open-tag>. Previous Comments: ------------------------------------------------------------------------ [2016-07-06 19:11:24] jim dot michaels at Jesusnjim dot com Description: ------------ 1. 7.1Git-2016-07-06 isn't even on your site - no dir for it. 2. php using .xml file as source tries to execute XML header because of <? and ?> but xml header says <?xml version='1.0' encoding='UTF-8'?> don't blast me because they are not separate bugs please. you know what happens if too many are put in on the same day. Test script: --------------- <?xml version='1.0' encoding='UTF-8'?> Expected result: ---------------- <?xml should be differentiated from <?php. in fact, it might be a lex priority issue where <? is lexed before <?php but XML and XHTML are not detected properly due to same problem. what is the header for XHTML 1.1/1.0? what about XHTML5? XHTML5.1? 5.2? see whatwg.org php should completely ignore the xml file since there is no PHP in it. or so I had thought. and it's not just a simple .xml file extension detection, it's an ENBF change, yes? Actual result: -------------- Wed 07/06/2016 11:49:00.42|C:\w\Jesusnjim|>php menu7a.xml Parse error: syntax error, unexpected 'version' (T_STRING) in C:\w\Jesusnjim\menu7a.xml on line 1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72556&edit=1

« previous php.bugs (#202108) next »