3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Aself { protected static function g0() { }; public static function get() { return self::g0(); } } class Astatic { protected static function g0() { }; public static function get() { return static::g0(); } } $t = microtime(true); for ($i = 0; $i < 10000; $i++) { Aself::get(); } echo microtime(true) - $t; echo "\n"; $t = microtime(true); for ($i = 0; $i < 10000; $i++) { Astatic::get(); } echo microtime(true) - $t; echo "\n";
Output for 5.4.0 - 5.4.20
Parse error: syntax error, unexpected ';', expecting function (T_FUNCTION) in /in/4fAgY on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /in/4fAgY on line 5
Process exited with code 255.