3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = []; // make some array for testing for($i=0; $i < 100; $i++) $array["key$i"] = $i; for($i=0; $i < 1000000; $i++) { foreach ($array as $firstKey => $value) { break; } }
based on WRAdn

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)
8.0.0beta10.0090.03916.73
8.0.0alpha30.0140.03416.68
8.0.0alpha20.0100.05116.70
8.0.0alpha10.0110.03616.53
7.4.90.0030.04716.45
7.4.80.0060.06719.39
7.4.70.0100.04016.59
7.4.60.0190.04116.51
7.4.50.0000.03016.31
7.4.40.0070.04416.45
7.4.30.0090.06616.48
7.4.10.0070.05214.84
7.4.00.0080.04714.88
7.3.210.0130.04016.61
7.3.200.0100.04719.39
7.3.190.0130.03916.66
7.3.180.0070.04416.37
7.3.170.0100.04316.29
7.3.160.0060.04516.20
7.3.130.0100.05014.60
7.3.120.0030.05114.75
7.3.110.0070.05014.77
7.3.100.0080.04414.63
7.3.90.0080.05014.72
7.3.80.0070.04414.75
7.3.70.0100.05114.63
7.3.60.0090.05314.62
7.3.50.0100.04914.66
7.3.40.0100.04714.56
7.3.30.0100.04114.50
7.3.20.0100.04614.70
7.3.10.0120.04114.77
7.3.00.0080.04514.61
7.2.330.0100.04916.43
7.2.320.0090.04716.52
7.2.310.0100.06916.62
7.2.300.0070.04816.66
7.2.290.0100.04216.44
7.2.260.0060.06714.78
7.2.250.0110.05715.03
7.2.240.0040.05314.83
7.2.230.0080.05114.93
7.2.220.0110.04715.02
7.2.210.0090.04714.87
7.2.200.0100.05214.95
7.2.190.0100.04514.88
7.2.180.0090.04614.83
7.2.170.0030.05214.91
7.2.160.0110.04714.88
7.2.150.0090.04915.05
7.2.140.0060.05014.81
7.2.130.0120.04315.01
7.2.120.0080.05215.01
7.2.110.0140.04614.89
7.2.100.0050.05514.94
7.2.90.0160.04715.02
7.2.80.0090.04914.92
7.2.70.0120.04315.00
7.2.60.0120.04415.39
7.2.50.0070.05314.98
7.2.40.0080.05414.93
7.2.30.0070.04814.91
7.2.20.0140.05514.93
7.2.10.0100.04714.93
7.2.00.0060.06216.39
7.1.330.0120.05313.96
7.1.320.0170.06113.92
7.1.310.0080.05214.00
7.1.300.0060.05513.86
7.1.290.0130.05213.80
7.1.280.0130.06013.80
7.1.270.0120.05013.84
7.1.260.0090.05013.95
7.1.250.0080.05213.81
7.1.240.0180.05313.87
7.1.230.0200.06513.69
7.1.220.0130.05213.99
7.1.210.0100.06013.81
7.1.200.0150.05514.36
7.1.190.0180.04913.84
7.1.180.0130.05313.92
7.1.170.0140.05513.80
7.1.160.0160.05613.82
7.1.150.0090.05313.80
7.1.140.0130.05113.88
7.1.130.0190.05813.70
7.1.120.0090.05814.83
7.1.110.0120.05214.88
7.1.100.0140.05514.84
7.1.90.0160.05514.77
7.1.80.0150.05814.74
7.1.70.0110.04914.98
7.1.60.0110.05318.01
7.1.50.0130.06017.94
7.1.40.0130.05617.76
7.1.30.0130.06417.78
7.1.20.0150.05517.81
7.1.10.0110.04914.74
7.1.00.0140.05314.93
7.0.330.0120.05213.53
7.0.320.0130.05313.47
7.0.310.0160.05913.43
7.0.300.0160.05113.31
7.0.290.0120.06913.45
7.0.280.0120.05213.38
7.0.270.0110.05213.46
7.0.260.0140.05314.52
7.0.250.0110.05814.31
7.0.240.0110.05414.47
7.0.230.0120.06314.48
7.0.220.0090.06114.42
7.0.210.0120.05214.23
7.0.200.0110.04914.68
7.0.190.0100.06014.63
7.0.180.0120.05514.53
7.0.170.0140.05314.41
7.0.160.0140.05314.50
7.0.150.0090.05114.51
7.0.140.0120.04914.53
7.0.130.0120.05114.52
7.0.120.0090.05114.51
7.0.110.0140.05114.36
7.0.100.0120.04514.42
7.0.90.0110.05414.43
7.0.80.0110.04714.43
7.0.70.0100.04914.40
7.0.60.0120.04714.30
7.0.50.0070.05314.52
7.0.40.0100.04714.18
7.0.30.0100.05114.11
7.0.20.0090.05814.21
7.0.10.0120.05614.25
7.0.00.0070.05614.14
5.6.400.0130.16414.34
5.6.390.0150.16514.42
5.6.380.0150.14614.44
5.6.370.0120.15214.46
5.6.360.0180.15414.27
5.6.350.0120.14614.51
5.6.340.0150.17814.37
5.6.330.0140.15914.30
5.6.320.0090.15514.36
5.6.310.0130.15814.58
5.6.300.0120.14816.62
5.6.290.0130.16316.61
5.6.280.0130.16216.55
5.6.270.0120.15116.61
5.6.260.0110.15616.61
5.6.250.0110.18016.60
5.6.240.0110.15916.47
5.6.230.0130.19716.51
5.6.220.0120.16416.59
5.6.210.0130.20416.56
5.6.200.0110.16316.48
5.6.190.0110.16316.51
5.6.180.0130.15716.55
5.6.170.0130.18516.60
5.6.160.0140.16016.53
5.6.150.0130.15216.55
5.6.140.0120.15616.52
5.6.130.0110.17216.51
5.6.120.0080.16716.56
5.6.110.0150.15916.55
5.6.100.0100.16316.50
5.6.90.0110.16416.51
5.6.80.0130.15216.25
5.6.70.0120.15616.22
5.6.60.0100.16116.34
5.6.50.0080.15616.18
5.6.40.0150.15816.22
5.6.30.0160.17316.24
5.6.20.0110.19016.25
5.6.10.0130.15216.29
5.6.00.0090.18916.24
5.5.380.0170.17415.51
5.5.370.0120.15415.47
5.5.360.0130.16515.39
5.5.350.0100.16715.36
5.5.340.0110.17215.54
5.5.330.0110.17115.53
5.5.320.0110.17115.46
5.5.310.0150.17615.52
5.5.300.0150.16015.59
5.5.290.0140.16415.50
5.5.280.0100.14715.64
5.5.270.0100.16815.56
5.5.260.0150.16315.62
5.5.250.0160.15915.49
5.5.240.0100.17615.20
5.5.230.0150.17415.17
5.5.220.0110.15615.31
5.5.210.0090.14915.36
5.5.200.0120.15915.32
5.5.190.0110.17315.24
5.5.180.0140.17415.28
5.5.170.0130.16114.16
5.5.160.0130.17215.25
5.5.150.0120.16315.29
5.5.140.0160.15015.23
5.5.130.0130.15415.22
5.5.120.0120.16515.24
5.5.110.0120.16115.23
5.5.100.0100.18315.19
5.5.90.0130.16815.30
5.5.80.0210.17615.16
5.5.70.0120.16615.12
5.5.60.0140.17115.20
5.5.50.0110.14915.28
5.5.40.0110.18415.13
5.5.30.0090.17015.29
5.5.20.0100.16915.20
5.5.10.0130.15315.13
5.5.00.0130.17115.22
5.4.450.0140.15914.61
5.4.440.0090.17714.60
5.4.430.0090.15514.60
5.4.420.0100.15914.65
5.4.410.0160.15714.60
5.4.400.0140.20114.56
5.4.390.0110.16814.51
5.4.380.0100.17114.49
5.4.370.0110.18014.51
5.4.360.0110.16614.49
5.4.350.0110.17514.53
5.4.340.0070.16114.51
5.4.330.0150.14912.27
5.4.320.0090.15914.50
5.4.310.0160.20114.54
5.4.300.0120.18414.51
5.4.290.0070.17214.49
5.4.280.0090.15714.53
5.4.270.0130.15214.49
5.4.260.0100.16314.49
5.4.250.0120.17814.50
5.4.240.0110.17414.52
5.4.230.0230.19014.50
5.4.220.0110.17014.53
5.4.210.0080.16314.48
5.4.200.0190.17014.49
5.4.190.0110.18314.52
5.4.180.0110.16014.51
5.4.170.0100.16614.51
5.4.160.0090.18314.51
5.4.150.0080.17314.48
5.4.140.0140.16713.64
5.4.130.0100.16313.61
5.4.120.0150.16513.70
5.4.110.0110.17113.65
5.4.100.0120.17713.70
5.4.90.0110.17713.69
5.4.80.0090.17713.64
5.4.70.0130.17713.67
5.4.60.0150.16813.72
5.4.50.0090.16213.66
5.4.40.0100.18013.68
5.4.30.0110.18113.66
5.4.20.0110.18413.64
5.4.10.0150.16713.70
5.4.00.0110.18013.50