3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // bench static method $starttime = microtime(true); for ($i = 0; $i< 10*1000*1000; $i++) SomeClass::doTest($i); echo "Static Time: " , (microtime(true)-$starttime) , " ms\n"; // bench object method $starttime = microtime(true); for ($i = 0; $i< 10*1000*1000; $i++) $someObj->doTest($i); echo "Object Time: " , (microtime(true)-$starttime) , " ms\n"; // bench function $starttime = microtime(true); for ($i = 0; $i< 10*1000*1000; $i++) something_doTest($i); echo "Function Time: " , (microtime(true)-$starttime) , " ms\n";
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Class 'SomeClass' not found in /in/dY8E6:5 Stack trace: #0 {main} thrown in /in/dY8E6 on line 5
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Class 'SomeClass' not found in /in/dY8E6 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Undefined class name 'someclass' in /in/dY8E6 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'someclass' in /in/dY8E6 on line 5