On Wed, 11 Feb 2015, Yasuo Ohgaki wrote:

> Hi Markus,
> 
> On Tue, Feb 10, 2015 at 5:59 PM, Markus Fischer <mar...@fischer.name> wrote:
> 
> > What constitutes "first token" in this context?
> >
> > Would this be detected as a PHP file?
> >
> > -----8<----
> > root:x:0:0:root:/root:/bin/bash
> > daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
> > bin:x:2:2:bin:/bin:/usr/sbin/nologin
> > <?php
> > phpinfo();
> > -----8<----
> >
> 
> Yes.
> 
> Since we have custom script loader, file content cannot be used for 
> "pure" PHP script detection. However, parser can detect if it's a 
> "pure" PHP script. i.e. Detect <?php token at first, no ?> in the 
> file.

That's arbitrary. The ?> at the end of a file is not an error (or a 
mistake). 

cheers,
Derick

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to