Bug #71151 [Opn]: File which contains only "<?php" isn't interpreted

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
Edit report at https://bugs.php.net/bug.php?id=71151&edit=1

 ID:                 71151
 Updated by:         [email protected]
 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:

Looks like this has been broken since 5.4: https://3v4l.org/kuLmD


Previous Comments:
------------------------------------------------------------------------
[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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.