Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67119 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34305 invoked from network); 24 Apr 2013 08:54:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2013 08:54:11 -0000 Authentication-Results: pb1.pair.com header.from=ml@anderiasch.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ml@anderiasch.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain anderiasch.de from 81.169.138.148 cause and error) X-PHP-List-Original-Sender: ml@anderiasch.de X-Host-Fingerprint: 81.169.138.148 ares.art-core.org Linux 2.5 (sometimes 2.4) (4) Received: from [81.169.138.148] ([81.169.138.148:48709] helo=mail.anderiasch.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/50-31471-0BD97715 for ; Wed, 24 Apr 2013 04:54:09 -0400 Message-ID: <51779DAC.5070300@anderiasch.de> Date: Wed, 24 Apr 2013 10:54:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130413 Icedove/17.0.5 MIME-Version: 1.0 To: Martin Keckeis CC: Daniele Orlando , Robert Stoll , Igor Wiedler , PHP Development References: <5170E1F8.9060203@sugarcrm.com> <000e01ce3ee3$597521f0$0c5f65d0$@tutteli.ch> <5174EE1C.2030002@anderiasch.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: AW: [PHP-DEV] Importing namespaced functions From: ml@anderiasch.de (Florian Anderiasch) On 04/24/2013 08:15 AM, Martin Keckeis wrote: > class Something{ > public static function blubb(); > > public static function blubb2(); > } > > > use Abc\Def\Something; > > Something::blubb(); > Something::blubb2(); Yes of course you can do that as an ugly workaround - but I wouldn't call that a good reason to treat functions differently than classes. This is just a gut feeling, but maybe Reflection stuff even differs for methods and functions. Would be interesting to compare memory footprint and execution speed of function vs. static method as well. (Do we even have some sort of general knowledge on this? Can anyone give (relative) numbers?) Additionally, it's either semantically wrong to group unrelated functions in "static tool classes", it's even a well-known antipattern. Greetings, Florian