Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48669 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19319 invoked from network); 7 Jun 2010 14:29:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jun 2010 14:29:05 -0000 Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 209.85.161.42 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:60830] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/30-17184-E220D0C4 for ; Mon, 07 Jun 2010 10:29:04 -0400 Received: by fxm10 with SMTP id 10so257252fxm.29 for ; Mon, 07 Jun 2010 07:28:59 -0700 (PDT) Received: by 10.223.144.79 with SMTP id y15mr3105347fau.22.1275920939605; Mon, 07 Jun 2010 07:28:59 -0700 (PDT) Received: from [192.168.80.150] (77-58-253-248.dclient.hispeed.ch [77.58.253.248]) by mx.google.com with ESMTPS id g10sm20542565fai.12.2010.06.07.07.28.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 07 Jun 2010 07:28:58 -0700 (PDT) Message-ID: <4C0D022C.6000409@seld.be> Date: Mon, 07 Jun 2010 16:29:00 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.5pre) Gecko/20100430 Lightning/1.0b2pre Thunderbird/3.1b2 MIME-Version: 1.0 To: "internals@lists.php.net" X-Enigmail-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: stream_resolve_include_path improvement From: j.boggiano@seld.be (Jordi Boggiano) Heya, stream_resolve_include_path [1] was introduced mostly to build framework autoloaders. Good. It's great as it is. However it still forces the framework to stash all its paths in the global include_path so that they're picked up by that function. Wouldn't it make sense to have an option, either via a third argument to it, or as part of the context options maybe, to allow people to pass their local include_path ? That would mean one can ask php to resolve the path for file a.php within array('/foo', '/bar'), without the need to alter the include_path at all. I'm thinking it could be handy for libs, but maybe I'm overlooking something, is it already possible? Does it even makes sense performance-wise? Cheers [1] http://ch2.php.net/stream_resolve_include_path -- Jordi Boggiano @seldaek :: http://seld.be/