Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66695 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30189 invoked from network); 19 Mar 2013 07:54:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2013 07:54:19 -0000 X-Host-Fingerprint: 92.103.172.102 unknown Date: Tue, 19 Mar 2013 02:54:19 -0500 Received: from [92.103.172.102] ([92.103.172.102:19717] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/50-28284-AA918415 for ; Tue, 19 Mar 2013 02:54:19 -0500 Message-ID: <4F.50.28284.AA918415@pb1.pair.com> To: internals@lists.php.net References: <20.05.17382.B0318415@pb1.pair.com> User-Agent: Pan/0.136 (I'm far too busy being delicious; GIT 926a150 git://git.gnome.org/pan2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Posted-By: 92.103.172.102 Subject: Re: [PHP-DEV] __invokeStatic() method From: bruno@chalopin.fr (Bruno CHALOPIN) Le Tue, 19 Mar 2013 09:37:43 +0200, Pierre du Plessis a écrit : > It would break existing software if you have a class and function with > the same name. > Consider the following example: > > class foo { > } > > function foo() > { > > } > > Now what if you have several calls to foo() in your existing > application? With the new change, will those calls call the function, or > invoke the __invokeStatic method if it is available? It will clearly technically lead to a problem. Now I don't see why in the world a class and a function could share the same name. Regarding conventions, a class name should begin with an uppercase character and a function a lowercase one. I don't see any relevant use case where a class and a function should share the same name. Bruno