Problem in 5.3.0alpha3 when first line of script begins with #
| From: | Phil Driscoll | Date: | Fri, 12 Dec 2008 11:30:23 +0000 |
| Subject: | Problem in 5.3.0alpha3 when first line of script begins with # | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-64568@lists.php.net to get a copy of this message | ||
I'm running 5.3.0alpha on a test machine. I noticed today that the styling of
all my Moodle sites was broken.
On closer inspection, it appears that 5.3.0alpha does not output the first
line of an included script if the line begins with #. Earler versions of PHP
(prior to 5.3.0alpha1) do output first lines beginning with #.
This causes a big problem for Moodle, and no doubt for other applications
which output CSS files by merging a number of source css files using
include_once(). If the first line of the file is something like #Header{...},
that line goes missing from the output.
In the news file, the only related change I can see is with regard to the
cgi.check_shebang_line configuration directive. This is not set in my php.ini
file and I presume would only affect first lines beginning with #!. The only
possibly related thing I can spot in the bugs database is bug #45779 fixed by
Dmitry in August.
Is this a bug (in which case I'll file a report) or intended new behaviour
which causes unintended BC problems?
Reproduce code:
test.php
<?php
include_once('test.inc');
?>
test.inc
#1
#2
#3
--
Phil Driscoll