Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46026 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5061 invoked from network); 11 Nov 2009 11:47:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Nov 2009 11:47:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:34169] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/D6-65174-054AAFA4 for ; Wed, 11 Nov 2009 06:47:30 -0500 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id D59A94144009; Wed, 11 Nov 2009 11:47:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E2oK2rKTJz3z; Wed, 11 Nov 2009 12:47:35 +0100 (CET) Received: from [192.168.80.71] (unknown [195.226.16.50]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id 7A5C8414400B; Wed, 11 Nov 2009 12:47:34 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes In-Reply-To: <8cf711460911110244m22e2fedag21e294d8d3909037@mail.gmail.com> Date: Wed, 11 Nov 2009 12:47:21 +0100 Cc: Greg Beaver , Stanislav Malyshev , internals@lists.php.net, Christian Schneider Content-Transfer-Encoding: 7bit Message-ID: <65D94139-8A66-4C89-8418-160F5B2A4280@pooteeweet.org> References: <413588E2-8AC8-49F7-B7BF-97BEFB0A71E4@pooteeweet.org> <4AF9A03E.8000207@cschneid.com> <4AF9AE1A.9000005@zend.com> <4AF9C589.3090604@chiaraquartet.net> <4AF9CCEA.1030500@zend.com> <4AFA0449.2030600@chiaraquartet.net> <4AFA0756.4020609@zend.com> <4AFA0A38.7000502@chiaraquartet.net> <8B520687-04D6-4CB3-BB7A-51A62D74489B@pooteeweet.org> <8cf711460911110244m22e2fedag21e294d8d3909037@mail.gmail.com> To: Mikko Koppanen X-Mailer: Apple Mail (2.1076) Subject: Re: [PHP-DEV] Re: alternative to the fopen() hack in autoloaders From: mls@pooteeweet.org (Lukas Kahwe Smith) On 11.11.2009, at 11:44, Mikko Koppanen wrote: > On Wed, Nov 11, 2009 at 10:00 AM, Lukas Kahwe Smith > wrote: >> >> On 11.11.2009, at 01:50, Greg Beaver wrote: >> >>> if (can_include($file)) { >>> include $file; >>> } >> >> >> I am sure you focused on the technical aspects. Just wanted to say >> that for >> a name "can" is not ideal, because there is no gurantee that the >> file will >> not have syntax errors. As such something with "exists" is better >> (for >> example include_file_exists(), though also not ideal) .. Stas >> proposal of a >> "file_find()" is also good, but I think it would be nice to have >> "include" >> in the name. >> > > Isn't this what stream_resolve_include_path does? it might .. the doc's are sort of unclear .. since fopen optionally checks the include path. then again the name of the function implies that it does a search in the include path. the name is a bit long .. but i like the use of "resolve". so a byte code cache should cache the resolution of the path thereby speeding up the subsequent call to include? regards, Lukas Kahwe Smith mls@pooteeweet.org