In PHP, (unlike what I originally thought) there is an overhead of calling static methods vs simple functions.
On a very simple bench, the overhead is over 30% of th
There is some thing Wrong in your tests. With a website designed to work with multiple users at the same time you have to create an object for each one. To run that object's method in your tests you should have:
for($i=0; $i<10*1000*1000; $i++)
{
$someObj = new someObj();
$someObj->doTest($i);
}
If your object had more properties and methods then creating it is slower and PHP uses more memory. A static method won't have this problem, and therefore using static methods is a better choice in lots of situations. For example, a class with some handy tools with static methods for common tasks.