3v4l.org

run code in 300+ PHP versions simultaneously
<?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.

preferences:
178.17 ms | 1395 KiB | 56 Q