3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r=[0,0,0]; $range=100000; $c=range(0,$range-1); for($a=0;$a<10;$a++){ $t=microtime(true); for($i=0;++$i<$range;)$c[$i]; $r[0]+=microtime(true)-$t; $t=microtime(true); foreach($c as $i)$i; $r[1]+=microtime(true)-$t; $t=microtime(true); $i=0; while(list(,$i)=each($c))$c[$i]; $r[2]+=microtime(true)-$t; } var_dump($r);

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.4.10.0080.06317.61
7.4.00.0130.05617.55
7.3.130.0080.06217.55
7.3.120.0050.06717.50
7.3.110.0100.06017.38
7.3.100.0050.05117.36
7.3.90.0100.04517.54
7.3.80.0020.04817.49
7.3.70.0080.04717.56
7.3.60.0030.04917.43
7.3.50.0060.04617.46
7.3.40.0050.04617.38
7.3.30.0080.04417.26
7.3.20.0030.04820.56
7.3.10.0080.04620.53
7.3.00.0080.04420.42
7.2.260.0080.07417.68
7.2.250.0030.07917.81
7.2.240.0030.04817.52
7.2.230.0030.05417.66
7.2.220.0130.05017.72
7.2.210.0070.04817.77
7.2.200.0120.04717.77
7.2.190.0130.04317.65
7.2.180.0080.04717.55
7.2.170.0050.04617.69
7.2.160.0080.04517.58
7.2.150.0020.05120.56
7.2.140.0050.04920.70
7.2.130.0130.04420.39
7.2.120.0020.07320.56
7.2.110.0070.04620.63
7.2.100.0050.05120.73
7.2.90.0050.05420.77
7.2.80.0050.05020.60
7.2.70.0050.05020.67
7.2.60.0020.05620.63
7.2.50.0070.06420.80
7.2.40.0100.04420.68
7.2.30.0030.06520.69
7.2.20.0030.05620.77
7.2.10.0100.05020.48
7.2.00.0040.05021.49
7.1.330.0050.08819.56
7.1.320.0080.08919.67
7.1.310.0050.09319.59
7.1.300.0030.09019.64
7.1.290.0050.09119.65
7.1.280.0050.08719.46
7.1.270.0060.08819.59
7.1.260.0020.09019.46
7.1.250.0020.09419.47
7.1.240.0030.09819.54
7.1.230.0070.08419.64
7.1.220.0050.08919.62
7.1.210.0030.09419.44
7.1.200.0030.08719.47
7.1.190.0050.09819.45
7.1.180.0050.11619.41
7.1.170.0070.08419.55
7.1.160.0050.09519.49
7.1.150.0070.09419.62
7.1.140.0070.08519.50
7.1.130.0070.08419.31
7.1.120.0050.08719.46
7.1.110.0110.09319.71
7.1.100.0030.09119.38
7.1.90.0080.08219.70
7.1.80.0050.10719.57
7.1.70.0010.07620.13
7.1.60.0090.08320.09
7.1.50.0060.08819.93
7.1.40.0070.09519.50
7.1.30.0030.09819.64
7.1.20.0070.09219.60
7.1.10.0030.08519.55
7.1.00.0040.09921.82
7.0.330.0050.09619.17
7.0.320.0030.09719.17
7.0.310.0030.09919.20
7.0.300.0030.10119.23
7.0.290.0050.10619.07
7.0.280.0070.09819.35
7.0.270.0050.09119.26
7.0.260.0070.09719.11
7.0.250.0100.09519.39
7.0.240.0080.11419.16
7.0.230.0020.09619.42
7.0.220.0070.09819.22
7.0.210.0070.09919.06
7.0.200.0050.09119.80
7.0.190.0030.10519.24
7.0.180.0080.09619.47
7.0.170.0030.09819.27
7.0.160.0050.10119.42
7.0.150.0080.09419.32
7.0.140.0080.11321.48
7.0.130.0050.10519.33
7.0.120.0100.09419.40
7.0.110.0050.10019.15
7.0.100.0240.08820.49
7.0.90.0060.11320.51
7.0.80.0050.09720.32
7.0.70.0040.11020.30
7.0.60.0060.10620.49
7.0.50.0040.09620.65
7.0.40.0090.09819.11
7.0.30.0040.10019.25
7.0.20.0060.10619.07
7.0.10.0020.10719.13
7.0.00.0060.08719.31
5.6.400.0070.19528.02
5.6.390.0080.19828.53
5.6.380.0120.19328.21
5.6.370.0120.19728.45
5.6.360.0120.20728.29
5.6.350.0070.20528.43
5.6.340.0180.19028.40
5.6.330.0120.19928.41
5.6.320.0180.20728.59
5.6.310.0120.20128.42
5.6.300.0100.20828.22
5.6.290.0070.20728.26
5.6.280.0150.18530.55
5.6.270.0150.19328.18
5.6.260.0120.21328.44
5.6.250.0130.19030.48
5.6.240.0070.20130.49
5.6.230.0220.18330.47
5.6.220.0140.18430.43
5.6.210.0120.18530.43
5.6.200.0090.18530.66
5.6.190.0110.16730.59
5.6.180.0090.18330.57
5.6.170.0150.16330.44
5.6.160.0140.16230.60
5.6.150.0120.16830.55
5.6.140.0100.17230.64
5.6.130.0120.17230.59
5.6.120.0070.17630.55
5.6.110.0090.17630.71
5.6.100.0160.16930.42
5.6.90.0130.20030.62
5.6.80.0110.18530.23
5.6.70.0140.18430.31
5.6.60.0150.18430.34
5.6.50.0060.19530.24
5.6.40.0100.17930.25
5.6.30.0110.20130.24
5.6.20.0140.19030.30
5.6.10.0120.18930.44
5.6.00.0120.18330.43
5.5.380.0120.18730.31
5.5.370.0110.18530.35
5.5.360.0130.19030.30
5.5.350.0090.20130.41
5.5.340.0140.18130.39
5.5.330.0110.17330.44
5.5.320.0090.17730.57
5.5.310.0070.18530.44
5.5.300.0070.17430.44
5.5.290.0100.18830.43
5.5.280.0130.19730.41
5.5.270.0130.16630.54
5.5.260.0140.18430.48
5.5.250.0140.19630.37
5.5.240.0100.19230.13
5.5.230.0130.19830.14
5.5.220.0160.20530.04
5.5.210.0140.18830.22
5.5.200.0110.19930.13
5.5.190.0100.19330.21
5.5.180.0120.20730.30
5.5.170.0100.19628.22
5.5.160.0170.19429.96
5.5.150.0130.17730.23
5.5.140.0180.19030.13
5.5.130.0120.18530.19
5.5.120.0180.17130.20
5.5.110.0140.16830.10
5.5.100.0160.18830.11
5.5.90.0130.19830.15
5.5.80.0070.20530.18
5.5.70.0120.18930.10
5.5.60.0160.18130.08
5.5.50.0110.18430.26
5.5.40.0120.19329.98
5.5.30.0130.18630.10
5.5.20.0100.19330.13
5.5.10.0110.18130.23
5.5.00.0170.17930.09
5.4.450.0080.17327.71
5.4.440.0120.16727.70
5.4.430.0080.17427.68
5.4.420.0080.18527.67
5.4.410.0120.18927.74
5.4.400.0080.18127.68
5.4.390.0110.19427.61
5.4.380.0180.19627.50
5.4.370.0090.19327.69
5.4.360.0120.19727.50
5.4.350.0040.19627.59
5.4.340.0130.17927.58
5.4.330.0160.20424.81
5.4.320.0110.19927.54
5.4.310.0140.20527.56
5.4.300.0150.18227.53
5.4.290.0160.18827.60
5.4.280.0100.19127.55
5.4.270.0130.18527.51
5.4.260.0080.20227.66
5.4.250.0100.17927.49
5.4.240.0100.18727.47
5.4.230.0120.19427.48
5.4.220.0110.20527.62
5.4.210.0090.19327.58
5.4.200.0180.18527.63
5.4.190.0070.19427.45
5.4.180.0090.19327.59
5.4.170.0170.18527.57
5.4.160.0130.18927.45
5.4.150.0110.18927.58
5.4.140.0080.19926.78
5.4.130.0100.19226.67
5.4.120.0110.20226.66
5.4.110.0110.18726.67
5.4.100.0140.19026.72
5.4.90.0110.18926.74
5.4.80.0120.18726.62
5.4.70.0130.17726.62
5.4.60.0120.18426.70
5.4.50.0190.17226.76
5.4.40.0100.17926.75
5.4.30.0090.17226.72
5.4.20.0120.18926.62
5.4.10.0100.17326.73
5.4.00.0130.18126.56
5.3.290.0080.02612.13
5.3.280.0050.02812.08
5.3.270.0080.02312.00
5.3.260.0060.02912.10
5.3.250.0040.02612.09
5.3.240.0060.02612.04
5.3.230.0030.03012.06
5.3.220.0030.01812.00
5.3.210.0040.02712.02
5.3.200.0060.02612.00
5.3.190.0020.02012.02
5.3.180.0090.01112.07
5.3.170.0050.02812.12
5.3.160.0040.02412.14
5.3.150.0040.02712.13
5.3.140.0010.03012.09
5.3.130.0050.02712.08
5.3.120.0010.02312.04
5.3.110.0090.02712.10
5.3.100.0030.02911.94
5.3.90.0040.02911.95
5.3.80.0030.02811.80
5.3.70.0070.01511.86
5.3.60.0020.02411.77
5.3.50.0010.03111.78
5.3.40.0070.02211.88
5.3.30.0040.01611.81
5.3.20.0060.02911.75
5.3.10.0060.01711.65
5.3.00.0060.02911.65
5.2.170.0070.03311.51
5.2.160.0000.06311.51
5.2.150.0000.03711.51
5.2.140.0030.03011.51
5.2.130.0000.06311.51
5.2.120.0100.03711.51
5.2.110.0170.04011.51
5.2.100.0000.05011.51
5.2.90.0000.03011.51
5.2.80.0030.03711.51
5.2.70.0070.06711.51
5.2.60.0030.03311.51
5.2.50.0000.06711.51
5.2.40.0100.05311.51
5.2.30.0030.04311.51
5.2.20.0070.05311.51
5.2.10.0130.04711.51
5.2.00.0070.03011.51
5.1.60.0000.05311.51
5.1.50.0030.03311.51
5.1.40.0000.05311.51
5.1.30.0070.04711.51
5.1.20.0100.04711.51
5.1.10.0030.03311.51
5.1.00.0030.03711.51
5.0.50.0000.02311.51
5.0.40.0000.03011.51
5.0.30.0070.04711.51
5.0.20.0000.03711.51
5.0.10.0070.02711.51
5.0.00.0070.04711.51
4.4.90.0000.03011.51
4.4.80.0000.03711.51
4.4.70.0030.03011.51
4.4.60.0030.03311.51
4.4.50.0000.02711.51
4.4.40.0030.03711.51
4.4.30.0000.03711.51
4.4.20.0070.03011.51
4.4.10.0000.02011.51
4.4.00.0000.02711.51
4.3.110.0030.03311.51
4.3.100.0030.03311.51
4.3.90.0030.03311.51
4.3.80.0030.03711.51
4.3.70.0000.02711.51
4.3.60.0070.01711.51
4.3.50.0030.01711.51
4.3.40.0000.03711.51
4.3.30.0000.03311.51
4.3.20.0000.01711.51
4.3.10.0000.03711.51
4.3.00.0000.03711.51

preferences:
38.92 ms | 400 KiB | 5 Q