Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85681 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11179 invoked from network); 2 Apr 2015 00:21:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Apr 2015 00:21:28 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.19 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.19 mout.gmx.net Received: from [212.227.15.19] ([212.227.15.19:63718] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DE/00-07407-78B8C155 for ; Wed, 01 Apr 2015 19:21:28 -0500 Received: from [192.168.0.101] ([88.134.68.210]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MXZ4Q-1Yz2Jx3l7W-00WVlR; Thu, 02 Apr 2015 02:21:23 +0200 Message-ID: <551C8B8C.4050206@gmx.de> Date: Thu, 02 Apr 2015 02:21:32 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Stanislav Malyshev , Christoph Becker , Dennis Birkholz , internals@lists.php.net References: <551BC7CF.3080309@birkholz.biz> <551C44C7.6060108@gmail.com> <551C48AC.3090908@birkholz.biz> <551C4A60.2050805@gmail.com> <551C5045.3010405@birkholz.biz> <551C56E2.8090100@gmail.com> <551C5AFB.7090107@birkholz.biz> <551C6296.40101@gmail.com> <551C7B32.70200@gmx.de> <551C7D86.6040608@gmail.com> In-Reply-To: <551C7D86.6040608@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:M6fbu3xCszonsCojYtjdxfDpJ/vQ3aQBL7nKDUllC+mp01cETv1 LZ+pOL8jefJ93VZY70/BczMrqFL3CQzETyub+tMYaeQ8vJG8WWwEj83pvk2lukD0QiF7Tgm O0gwnpkfpiIc3prKzZLT8pIz4vzW3hb1w9CLm0w3ZW3CscKZeV0WXO0lPYVtd588WnDyswa b67VPteeTOTO3tEkQ5qfw== X-UI-Out-Filterresults: notjunk:1; Subject: Re: [PHP-DEV] What's our official stance on small self-containedadditionsin a micro version From: cmbecker69@gmx.de (Christoph Becker) Stanislav Malyshev wrote: >> Hmm, would you consider introducing a new function in the *global* >> namespace to be a self-contained feature? I would not, because the > > Depends on the function. It it's properly prefixed and does not rely or > disrupt anything else then yes. Otherwise, no. But what is "properly prefixed"? Is there a list of reserved prefixes? >> function definition would change the global environment, possibly >> breaking some code. > > You can always invent some code that depends on exact state of the > universe in the moment (https://xkcd.com/1172/) but let's be reasonable > - if somebody stuck their function into intl_* or mysql_* namespace > whatever happens next is on them. I agree. However, there are other "namespaces" which are not so special, especially for beginners, for instance, array_* and str_*. And of course, someone might consider it to be reasonable to invent a new function in userland which is an extension of some existing function, therefore giving it a similar name, e.g. preg_replace_callback_array(). Would that be considered to be bad style? If so, where is it documented? I'm aware that I'm nit-picking, and that the probability of such collisions is near zero, but it is not equal to zero. -- Christoph M. Becker