Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82462 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91593 invoked from network); 11 Feb 2015 09:36:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2015 09:36:14 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:43712] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/80-22055-D822BD45 for ; Wed, 11 Feb 2015 04:36:13 -0500 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 7069BE202E; Wed, 11 Feb 2015 09:36:10 +0000 (GMT) Date: Wed, 11 Feb 2015 09:36:09 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Yasuo Ohgaki cc: Markus Fischer , "internals@lists.php.net" In-Reply-To: Message-ID: References: <54D9C867.9030107@fischer.name> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Script only includes From: derick@php.net (Derick Rethans) On Wed, 11 Feb 2015, Yasuo Ohgaki wrote: > Hi Markus, > > On Tue, Feb 10, 2015 at 5:59 PM, Markus Fischer 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 > > > 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 in the > file. That's arbitrary. The ?> at the end of a file is not an error (or a mistake). cheers, Derick