Re: [RFC][DISCUSSION] Script only includes
| From: | Derick Rethans | Date: | Wed, 11 Feb 2015 09:36:09 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Script only includes | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-82462@lists.php.net to get a copy of this message | ||
On Wed, 11 Feb 2015, Yasuo Ohgaki wrote:
> Hi Markus,
>
> On Tue, Feb 10, 2015 at 5:59 PM, Markus Fischer <markus@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