Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46021 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75832 invoked from network); 11 Nov 2009 07:27:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Nov 2009 07:27:06 -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:55239] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/91-65174-7476AFA4 for ; Wed, 11 Nov 2009 02:27:04 -0500 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id A2C8C414400B; Wed, 11 Nov 2009 07:27:11 +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 DZKNufs-PDS4; Wed, 11 Nov 2009 08:27:10 +0100 (CET) Received: from [10.161.71.87] (gprs37.swisscom-mobile.ch [193.247.250.37]) (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 B5F5E4144009; Wed, 11 Nov 2009 08:27:09 +0100 (CET) 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> Message-ID: To: Greg Beaver In-Reply-To: <4AFA0A38.7000502@chiaraquartet.net> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (7D11) Mime-Version: 1.0 (iPhone Mail 7D11) Date: Wed, 11 Nov 2009 08:27:07 +0100 Cc: Stanislav Malyshev , "internals@lists.php.net" , Christian Schneider Subject: Re: [PHP-DEV] Re: alternative to the fopen() hack in autoloaders From: mls@pooteeweet.org (Lukas Kahwe Smith) > > Perhaps better would be to introduce a function: > > if (can_include($file)) { > include $file; > } > > opcode caches could easily snag this, as we could provide a simple > hook the way we do with stream_resolve_path(). That would actually > make a 0-stat smart autoloader a possibility. Just in case it isn't > obvious, can_include() would be the equivalent to an include_path > search followed by is_readable(), which is essentially what the fopen > () hack does now. can_include() would also remove the unnecessary > opening of the file that fopen() performs. so you are suggesting that the byte code cache also cache file searches performed by this function. this is starting to sound more interesting from my pov. regards lukas