3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait StaticCall { protected function callStatic($className, $methodName) { $parameters = func_get_args(); $parameters = array_slice($parameters, 2); return call_user_func_array($className . '::' . $methodName, $parameters); } } class Parent { public function foo() { echo __METHOD__; } } class Child extends Parent { use StaticCall; public function foo() { $this->callStatic('parent', 'foo'); } } class GrandChild extends Parent { use StaticCall; } $c = new GrandChild(); $c->foo();

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.6.110.0130.07321.01
5.6.100.0030.08321.11
5.6.90.0130.07721.10
5.6.80.0070.05720.51
5.5.270.0170.07020.96
5.5.260.0100.07320.86
5.5.250.0100.07320.69
5.5.240.0230.07320.19
5.4.430.0230.06019.54
5.4.420.0100.05319.66
5.4.410.0130.05019.38
5.4.400.0230.04318.92
5.4.390.0100.05019.00
5.4.380.0100.05319.19
5.4.370.0070.05719.24
5.4.360.0100.05019.11
5.4.350.0130.05019.17
5.4.340.0130.05718.94
5.4.320.0100.05719.14
5.4.310.0100.05319.13
5.4.300.0170.04719.16
5.4.290.0030.05719.24
5.4.280.0170.04719.29
5.4.270.0070.05319.24
5.4.260.0200.04319.03
5.4.250.0030.06019.13
5.4.240.0030.06319.15
5.4.230.0170.05019.12
5.4.220.0100.05318.98
5.4.210.0100.05019.28
5.4.200.0070.05317.11
5.4.190.0100.05019.27
5.4.180.0070.05719.22
5.4.170.0170.04719.26
5.4.160.0170.05719.27
5.4.150.0130.06319.23
5.4.140.0070.05316.31
5.4.130.0100.05316.31
5.4.120.0070.05316.53
5.4.110.0130.04316.48
5.4.100.0070.05016.52
5.4.90.0070.05316.53
5.4.80.0100.05016.62
5.4.70.0070.05716.46
5.4.60.0100.04716.22
5.4.50.0030.05316.60
5.4.40.0100.05016.38
5.4.30.0130.04716.33
5.4.20.0030.05716.31
5.4.10.0030.05316.62
5.4.00.0130.04315.89
5.3.290.0200.04314.49
5.3.280.0070.05714.48
5.3.270.0000.06014.50
5.3.260.0100.05014.61
5.3.250.0130.05014.52
5.3.240.0170.04314.49
5.3.230.0100.05014.50
5.3.220.0070.05314.41
5.3.210.0070.05714.48
5.3.200.0000.06014.57
5.3.190.0070.05314.59
5.3.180.0170.04014.49
5.3.170.0130.04714.57
5.3.160.0100.05014.50
5.3.150.0130.04714.46
5.3.140.0000.06014.47
5.3.130.0000.06014.46
5.3.120.0170.04714.41
5.3.110.0170.05014.39
5.3.100.0170.05713.94
5.3.90.0170.04714.05
5.3.80.0030.07013.88
5.3.70.0200.05313.85
5.3.60.0100.05013.87
5.3.50.0070.05313.97
5.3.40.0170.04013.89
5.3.30.0130.04713.75
5.3.20.0030.05713.63
5.3.10.0100.04713.63
5.3.00.0170.04313.55
5.2.170.0030.04311.09
5.2.160.0070.04011.09
5.2.150.0070.04310.99
5.2.140.0000.04711.14
5.2.130.0070.04011.04
5.2.120.0000.05011.10
5.2.110.0100.03711.09
5.2.100.0000.04711.00
5.2.90.0000.04711.04
5.2.80.0000.04711.10
5.2.70.0170.03310.93
5.2.60.0030.06011.06
5.2.50.0070.04310.95
5.2.40.0030.04311.07
5.2.30.0000.04710.90
5.2.20.0070.04010.88
5.2.10.0030.04310.71
5.2.00.0070.04010.69
5.1.60.0070.0339.93
5.1.50.0030.0379.91
5.1.40.0070.0339.91
5.1.30.0070.03710.43
5.1.20.0030.04010.43
5.1.10.0070.03710.06
5.1.00.0030.03710.15
5.0.50.0030.0308.46
5.0.40.0030.0308.39
5.0.30.0000.0508.14
5.0.20.0070.0238.12
5.0.10.0070.0238.20
5.0.00.0000.0478.29
4.4.90.0030.0205.78
4.4.80.0000.0235.78
4.4.70.0070.0175.78
4.4.60.0000.0235.78
4.4.50.0000.0235.78
4.4.40.0100.0305.78
4.4.30.0000.0235.78
4.4.20.0070.0205.82
4.4.10.0000.0235.81
4.4.00.0030.0335.88
4.3.110.0000.0235.78
4.3.100.0070.0175.78
4.3.90.0000.0235.78
4.3.80.0000.0375.83
4.3.70.0030.0205.78
4.3.60.0000.0235.78
4.3.50.0000.0235.78
4.3.40.0030.0305.78
4.3.30.0000.0235.78
4.3.20.0000.0235.78
4.3.10.0000.0235.78
4.3.00.0100.0176.79

preferences:
138.39 ms | 1398 KiB | 7 Q