Edit report at https://bugs.php.net/bug.php?id=63794&edit=1
ID: 63794 Updated by: ras...@php.net Reported by: simon at simon dot geek dot nz Summary: Parser does not match EOF after opening tag -Status: Open +Status: Not a bug Type: Bug Package: Scripting Engine problem Operating System: N/A PHP Version: 5.5.0alpha1 Block user comment: N Private report: N New Comment: Yeah, EOF is not classified as whitespace as per the spec, so <?php<EOF> is not actually a valid opening PI tag and as such it is correct that it will be output. No bug here. Previous Comments: ------------------------------------------------------------------------ [2012-12-18 02:50:43] ahar...@php.net Rasmus's comment in bug #61723 is probably relevant here. ------------------------------------------------------------------------ [2012-12-18 02:44:41] larue...@php.net I am not sure, why we need this? ------------------------------------------------------------------------ [2012-12-18 00:49:08] simon at simon dot geek dot nz Tested this on PHP 5.3.15, 5.4.9-dev and 5.5.0a1. The same behaviour occurs each time. ------------------------------------------------------------------------ [2012-12-18 00:47:23] simon at simon dot geek dot nz Description: ------------ The parser for the opening tag checks for <?php[ \t\n]. This causes a file that's an opening tag, directly followed by the EOF to not be parsed as a PHP file, causing the tag to be outputted. Test script: --------------- <?php Expected result: ---------------- No output at all. Actual result: -------------- The <?php tag is outputted. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63794&edit=1