A: 

Here is an article that discusses differences in performance between some of these concepts: http://www.webhostingtalk.com/showthread.php?t=538076

jasondavis
Thank you for the link. however, results there are actually somewhat inconclusive so not really helpful.
jcinacio
+1  A: 

It has been a while since I have done any PHP but this is probably similar to what you expect in other programming environments.

It is likely that the static method requires some construction of a SomeClass object behind the scenes each time that it is called, whereas the function can just be executed without any startup cost. Creating an object could be costly depending on a number of things: destruction of existing objects by a garbage collector/reference counter, memory pressure causing fragmentation, suboptimal memory allocation policies in the C runtime etc.

It would be interesting to compare the method performance of an existing object. To do this create an instance of SomeClass and then call an instance method repeatedly.

BrianLy
updated question with object method benchmark - not really the result i would imagine.
jcinacio
A: 

In the case of the static method, PHP has to check wether the method can or cannot be called from the calling context (public, protected, private). That's most likely what causes the overhead, or at least part of it, since the classic function call doesn't require PHP to perform that kind of check.

Nicolas
that makes sense - however, calling an object method is faster, and the same rules apply...
jcinacio
Maybe PHP checks wether a specific object method can be called from the current context or not, only once, and stores that information in memory as long as the execution loop remains in this same context...But does not do that for static methods. Man, you got me wondering why, now :) That a question you could ask on the PHP dev list !
Nicolas
A: 

You do not need to care about this. If you do, that means you have done something wrong designing your system. A performance should be attempted to be increased using other ways.

FractalizeR
I do know optimization starts at the "cheapest" (easier) points, but i also cannot overlook the fact that performance differences exist between different ways of achieving the same result. Also, the values in cause - 20% - 30% overhead - are not to be taken lightly, specially for code that does these calls a very large number of times.
jcinacio
If you really care so much about performance, you should not use PHP at all. Interpreting source code and even executing byte code is so slow... Pure C is the key! Your 20-30% are only several microseconds or milliseconds. Who cares how much user awaits server response - 20 or 40 milliseconds? Your database queries and template fetching will eat up all your optimizations. You started to optimize in the wrong place. Read Fouler.
FractalizeR