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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to