3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { protected function foo(); public function bar() { return $this->foo() * 100; } } class A { use T; //protected function foo() { return 42; } } $a = new A(); var_dump($a->bar());

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)
7.0.10.0070.05020.21
7.0.00.0100.04720.09
5.6.160.0130.07720.50
5.6.150.0030.07018.27
5.6.140.0030.08718.25
5.6.130.0130.05718.29
5.6.120.0100.08721.08
5.6.110.0030.04720.99
5.6.100.0100.07021.13
5.6.90.0030.08021.10
5.6.80.0070.08720.49
5.5.300.0030.05317.95
5.5.290.0030.05317.95
5.5.280.0070.08320.88
5.5.270.0130.07020.96
5.5.260.0070.03720.76
5.5.250.0070.07020.69
5.5.240.0130.08020.07
5.4.450.0530.05319.25
5.4.440.0470.06019.56
5.4.430.0430.06019.60
5.4.420.0470.05019.59
5.4.410.0330.06019.42
5.4.400.0530.05019.19
5.4.390.0400.06018.93
5.4.380.0400.05719.11
5.4.370.0370.05718.97
5.4.360.0470.05719.10
5.4.350.0500.05319.18
5.4.340.0500.05018.94
5.4.320.0470.05719.09
5.4.310.0470.06319.20
5.4.300.0530.05719.16
5.4.290.0770.05318.96
5.4.280.0430.05319.32
5.4.270.0500.05319.20
5.4.260.0370.06319.21
5.4.250.0530.05019.20
5.4.240.0500.06019.17
5.4.230.0530.06319.20
5.4.220.0430.05319.11
5.4.210.0530.04719.13
5.4.200.0530.06319.11
5.4.190.0500.05319.16
5.4.180.0670.04019.22
5.4.170.0530.05719.08
5.4.160.0600.04018.90
5.4.150.0500.06019.21
5.4.140.0470.06316.55
5.4.130.0430.07316.39
5.4.120.0130.04316.50
5.4.110.0630.05316.50
5.4.100.0630.05016.50
5.4.90.0530.05016.54
5.4.80.0430.05716.63
5.4.70.0100.05316.57
5.4.60.0330.06016.60
5.4.50.0600.04716.59
5.4.40.0530.07016.22
5.4.30.0430.05016.53
5.4.20.0330.07016.59
5.4.10.0530.05016.47
5.4.00.0600.05715.97
5.3.290.0530.05314.61
5.3.280.0270.05714.50
5.3.270.0570.05714.54
5.3.260.0530.04714.52
5.3.250.0470.05014.54
5.3.240.0500.04714.61
5.3.230.0530.04714.50
5.3.220.0300.04714.53
5.3.210.0630.05714.50
5.3.200.0530.06014.46
5.3.190.0530.05714.46
5.3.180.0600.05714.46
5.3.170.0130.04714.47
5.3.160.0630.04314.48
5.3.150.0570.05314.65
5.3.140.0670.05314.48
5.3.130.0100.05714.48
5.3.120.0130.05314.56
5.3.110.0530.09014.45
5.3.100.0070.06713.96
5.3.90.0400.04313.90
5.3.80.0570.05713.94
5.3.70.0600.06014.02
5.3.60.0570.05013.93
5.3.50.0570.05013.87
5.3.40.0570.05013.86
5.3.30.0470.05713.80
5.3.20.0470.05013.57
5.3.10.0570.06013.59
5.3.00.0500.05013.55
5.2.170.0400.04710.96
5.2.160.0470.05311.22
5.2.150.0530.04011.04
5.2.140.0500.04011.06
5.2.130.0430.04311.00
5.2.120.0630.04311.03
5.2.110.0430.03711.02
5.2.100.0030.04011.25
5.2.90.0400.03711.03
5.2.80.0470.03710.95
5.2.70.0470.04711.08
5.2.60.0370.05010.98
5.2.50.0370.04711.16
5.2.40.0330.04010.87
5.2.30.0530.02710.95
5.2.20.0500.03010.86
5.2.10.0370.04310.84
5.2.00.0370.04010.86
5.1.60.0430.0379.97
5.1.50.0430.0279.83
5.1.40.0330.0379.96
5.1.30.0370.04010.18
5.1.20.0370.04010.33
5.1.10.0370.0379.90
5.1.00.0400.0339.96
5.0.50.0270.0278.51
5.0.40.0200.0278.41
5.0.30.0230.0478.37
5.0.20.0230.0278.25
5.0.10.0200.0308.17
5.0.00.0200.0508.12
4.4.90.0200.0276.61
4.4.80.0100.0306.61
4.4.70.0170.0276.61
4.4.60.0170.0306.61
4.4.50.0200.0236.61
4.4.40.0230.0376.61
4.4.30.0130.0276.61
4.4.20.0130.0276.61
4.4.10.0270.0136.61
4.4.00.0170.0336.61
4.3.110.0130.0236.61
4.3.100.0230.0206.61
4.3.90.0170.0236.61
4.3.80.0170.0376.61
4.3.70.0230.0306.61
4.3.60.0130.0336.61
4.3.50.0270.0276.61
4.3.40.0130.0406.61
4.3.30.0100.0276.61
4.3.20.0130.0276.61
4.3.10.0100.0236.61
4.3.00.0130.0206.61

preferences:
144.33 ms | 1394 KiB | 7 Q