Bug #71151 [Com]: File which contains only "<?php" isn't interpreted
| From: | ajf@php.net | Date: | Sat, 19 Dec 2015 17:02:28 +0000 |
| Subject: | Bug #71151 [Com]: File which contains only "<?php" isn't interpreted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-198040@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71151&edit=1
ID: 71151
Comment by: ajf@php.net
Reported by: daniel dot korner at tu-dortmund dot de
Summary: File which contains only "<?php" isn't interpreted
Status: Open
Type: Bug
Package: *General Issues
Operating System: Linux 4.2.5-1-Arch
PHP Version: 7.0.1
Block user comment: N
Private report: N
New Comment:
The reason you couldn't reproduce it on Linux is probably because it is a UNIX convention to
treat newlines (aka LF or \n) as marking the end of a line, not separating lines, and so UNIX text
editors tend to add a newline at the end of a file.
Previous Comments:
------------------------------------------------------------------------
[2015-12-19 16:46:12] ajf@php.net
Looks like this has been broken since 5.4: https://3v4l.org/kuLmD
------------------------------------------------------------------------
[2015-12-17 19:04:30] daniel dot korner at tu-dortmund dot de
Description:
------------
By accident I created a file that only contains "<?php". This file has no space, line
break or other character following after the last "p". In this case, the php interpreter
does not interpret the file and simply returns the string "<?php".
If I then add a space, line break or other whitespace character after the last "p", the
interpreters starts to interpret the .php file correctly and returns an empty string.
I could reproduce this behaviour with PHP 7.0.0 and PHP 7.0.1 but not with PHP 5.6.16 on a Computer
running Linux (4.2.5-1-ARCH x86_64).
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71151&edit=1