3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('LOOP',1000000); class ClassA { static function a() { } } function b() { } function f1() { for($i=0; $i<LOOP; ++$i) { ClassA::a(); ClassA::a(); ClassA::a(); ClassA::a(); ClassA::a(); ClassA::a(); ClassA::a(); ClassA::a(); ClassA::a(); ClassA::a(); } } function f2() { for($i=0; $i<LOOP; ++$i) { b(); b(); b(); b(); b(); b(); b(); b(); b(); b(); } } $start = microtime(true); f1(); $stop = microtime(true); $time1 = $stop - $start; $start = microtime(true); f2(); $stop = microtime(true); $time2 = $stop - $start; echo $time1 . "\t"; echo $time2 . "\n";

Abusive script

This script was stopped while abusing our resources