EDIT::oh i forgot
class Test1{
public static function test(){
for($i=0; $i<=1000; $i++)
$j += $i;
}
}
class Test2{
public function test() {
for ($i=0; $i<=1000; $i++){
$j += $i;
}
}
}
for this algorithm
$time_start = microtime();
$test1 = new Test2();
for($i=0; $i<=100;$i++)
$test1->test();
$time_end = microtime();
$time1 = $time_end - $time_start;
$time_start = microtime();
for($i=0; $i<=100;$i++)
Test1::test();
$time_end = microtime();
$time2 = $time_end - $time_start;
$time = $time1 - $time2;
echo "Difference: $time";
i have results
Difference: 0.007561
and these days, i am trying to make my methods static as possible. But is it really true, .. atleast for php