Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54614 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96401 invoked from network); 15 Aug 2011 07:15:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2011 07:15:50 -0000 Authentication-Results: pb1.pair.com header.from=sebastian.krebs.berlin@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=sebastian.krebs.berlin@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: sebastian.krebs.berlin@googlemail.com X-Host-Fingerprint: 74.125.82.54 mail-ww0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:57675] helo=mail-ww0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/03-12367-4A7C84E4 for ; Mon, 15 Aug 2011 03:15:49 -0400 Received: by wwg11 with SMTP id 11so3564872wwg.11 for ; Mon, 15 Aug 2011 00:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=nUVJZi/uzcxLxWTjw6gyPobiVC/KRmJFef+cN/Q8vEM=; b=YuikRq1qToBoWpEkUHDHSuYCSlX9FyPK6CLgnEir2zHvtmvkrMZbUN6tYk9s9nX66i Fi1sY6XpPjhx/g/tkIBlpeQRMEpgZ8drAPnEyGjYF/naK5vQGLrQnTGNAdT4xSSVi4H2 ZBzdgRzmgREtlRIwgb0cU5Vl/2dHMKZbdksYQ= MIME-Version: 1.0 Received: by 10.216.4.208 with SMTP id 58mr1761394wej.93.1313392544906; Mon, 15 Aug 2011 00:15:44 -0700 (PDT) Sender: sebastian.krebs.berlin@googlemail.com Received: by 10.216.27.14 with HTTP; Mon, 15 Aug 2011 00:15:44 -0700 (PDT) In-Reply-To: <4E48C126.50707@sugarcrm.com> References: <4E481136.3090508@sugarcrm.com> <4E483284.4010100@googlemail.com> <4E4838E1.3000006@sugarcrm.com> <4E48430D.6070409@googlemail.com> <4E486A50.4010700@sugarcrm.com> <4E48A22E.1040900@googlemail.com> <4E48AD3E.6010801@sugarcrm.com> <4E48C126.50707@sugarcrm.com> Date: Mon, 15 Aug 2011 09:15:44 +0200 X-Google-Sender-Auth: 8vjs1xIg7GmL2jm6y6IloUSot2s Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=00163646db7016ff3604aa860887 Subject: Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload* From: krebs.seb@googlemail.com (Sebastian Krebs) --00163646db7016ff3604aa860887 Content-Type: text/plain; charset=ISO-8859-1 2011/8/15 Stas Malyshev > Hi! > > > On 8/14/11 11:21 PM, Sebastian Krebs wrote: > >> I already made an suggestion [1], that bypass this. >> > > That suggestion means you can not autoload namespaced function that > overrides global function. Major WTF. Imo overriding built-in functions is a WTF... Confusing others by changing the behaviour of well-known functions just sounds scary. However, when you really want to do this, than you can load your functions like before > Also leads to two autoload calls (one most probably resulting in exhaustive > include path search) when autoloading a non-namespaced function. Pretty bad > idea IMO. Please read my other mail completely: - Developers will get used to namespace everything of their stuff to avoid name conflicts (_exactly_ like it is for classes already) - Usually more than one function is loaded at once, thus you will probably safe other autoloader-calls later on. This means, there will be two calls to the autoloader _only_ when the function does not exists at all. In this case you have other problems than the two calls. > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --00163646db7016ff3604aa860887--