3v4l.org

run code in 300+ PHP versions simultaneously
<?php function callStatic($class, $method, $args, $ref, $defined, $called) { var_dump($class, $defined, $called); $ref = new \ReflectionMethod($class, $method); $ref->setAccessible(true); return $ref->invokeArgs(null, array($args); } class n_0d19ad5d1a89cbbf06a49f56e9dcb11d { public static function foo() { return callStatic('static', 'bar', array(), array(), __CLASS__, call_user_func(function () { set_error_handler(function () { }); $called = get_called_class(); restore_error_handler(); return $called; })); } } class n_1c54f3f5b4e9e0fc521faa21fe127ad8 extends n_0d19ad5d1a89cbbf06a49f56e9dcb11d { protected static function bar() { return __CLASS__; } } echo callStatic('n_1c54f3f5b4e9e0fc521faa21fe127ad8', 'foo', array(), array(), __CLASS__, call_user_func(function () { set_error_handler(function () { }); $called = get_called_class(); restore_error_handler(); return $called; }));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.250.0100.05318.95
5.4.240.0070.05318.93
5.4.230.0030.05718.94
5.4.220.0270.03318.94
5.4.210.0000.05718.93
5.4.200.0030.05719.11
5.4.190.0100.05318.80
5.4.180.0130.04319.02
5.4.170.0100.07718.79
5.4.160.0100.07718.64
5.4.150.0000.06318.79
5.4.140.0070.05016.51
5.4.130.0030.05716.55
5.4.120.0070.05016.39
5.4.110.0070.07016.49
5.4.100.0030.05716.37
5.4.90.0030.05016.29
5.4.80.0070.04716.54
5.4.70.0030.05016.46
5.4.60.0070.04716.38
5.4.50.0100.04716.42
5.4.40.0100.04716.54
5.4.30.0130.04316.58
5.4.20.0000.05716.52
5.4.10.0130.04316.43
5.4.00.0070.04716.00
5.3.280.0070.05014.76
5.3.270.0100.05014.79
5.3.260.0130.04314.43
5.3.250.0170.04314.74
5.3.240.0030.05714.69
5.3.230.0100.04714.68
5.3.220.0100.07014.63
5.3.210.0100.04714.65
5.3.200.0130.04314.55
5.3.190.0030.05714.75
5.3.180.0030.05014.55
5.3.170.0030.05314.55
5.3.160.0030.05314.39
5.3.150.0030.05714.72
5.3.140.0030.05314.53
5.3.130.0030.05314.63
5.3.120.0130.05314.62
5.3.110.0030.05714.63
5.3.100.0030.05314.18
5.3.90.0130.06014.11
5.3.80.0000.05314.11
5.3.70.0000.05314.18
5.3.60.0000.05313.98
5.3.50.0070.05014.04
5.3.40.0100.05014.17
5.3.30.0130.04013.74
5.3.20.0030.05013.79
5.3.10.0100.05313.71
5.3.00.0030.06713.66

preferences:
142.61 ms | 1394 KiB | 7 Q