Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35487 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49571 invoked by uid 1010); 14 Feb 2008 09:31:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49555 invoked from network); 14 Feb 2008 09:31:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2008 09:31:55 -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 85.10.196.195 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 85.10.196.195 serveforce1.backendmedia.com Linux 2.6 Received: from [85.10.196.195] ([85.10.196.195:43425] helo=serveforce1.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/D0-43552-A8A04B74 for ; Thu, 14 Feb 2008 04:31:55 -0500 Received: from [192.168.84.38] (office-zh.liip.ch [91.192.102.250]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by serveforce1.backendmedia.com (Postfix) with ESMTP id 5847A1224181; Thu, 14 Feb 2008 10:13:02 +0100 (CET) Cc: Jochem Maas , Pierre Joye , PHP Internals List Message-ID: <3E14112B-8D08-4339-92DF-BA0320B9FF32@pooteeweet.org> To: Lars Strojny In-Reply-To: <1202980076.7717.12.camel@localhost> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Thu, 14 Feb 2008 10:12:24 +0100 References: <1202917630.25345.6.camel@localhost> <1202943887.7717.7.camel@localhost> <47B383C1.3030303@iamjochem.com> <1202980076.7717.12.camel@localhost> X-Mailer: Apple Mail (2.919.2) X-backendmedia-com-MailScanner-Information: Please contact the ISP for more information X-backendmedia-com-MailScanner: Found to be clean X-backendmedia-com-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0, required 6) X-backendmedia-com-MailScanner-From: mls@pooteeweet.org X-Spam-Status: No Subject: Re: [PHP-DEV] [RFC] prepend_include_path()/append_include_path() From: mls@pooteeweet.org (Lukas Kahwe Smith) On 14.02.2008, at 10:07, Lars Strojny wrote: > Hi Jochem, > > Am Donnerstag, den 14.02.2008, 00:56 +0100 schrieb Jochem Maas: >> I think Lars has a point ... maybe set_include_path() could >> be given a second parameter instead to mitigate the need for seperate >> funcs?: >> >> set_include_path('foo', INCPATH_OVERRIDE); // default >> set_include_path('foo', INCPATH_APPEND); >> set_include_path('foo', INCPATH_PREPEND); > > Thanks for your support, but this seems counter intuitive. Why should > *set*_include_path() be used to *append* or *prepend* to the include > path? Also learning another mouthful of constants is maybe suboptimal. > Getting used to prepend_/append_...() is easy from my point of view, > as > the name is derived from what's currently present > (set_include_path()). Yeah, I agree that if at all I would go with Lars's original proposal. I am +1 if we also commit array_merge_replace() at the same time :) No seriously, its rare enough stuff that I do not see a special need for these functions. But I do buy the argument that it improves readability and is easier to remember (and get proper autocompletion in an IDE). So I am +0. regards, Lukas