Re: [RFC][DISCUSSION] Script only includes
| From: | Yasuo Ohgaki | Date: | Wed, 11 Feb 2015 00:09:39 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Script only includes | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-82402@lists.php.net to get a copy of this message | ||
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.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net