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; } }

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.1.70.0000.02317.49
8.1.60.0030.04017.58
8.1.50.0000.04217.57
8.1.40.0000.04117.51
8.1.30.0030.03817.71
8.1.20.0000.04117.65
8.1.10.0030.03817.55
8.1.00.0030.03817.37
8.0.200.0040.02116.82
8.0.190.0000.04316.89
8.0.180.0000.05016.92
8.0.170.0030.04016.75
8.0.160.0030.03816.96
8.0.150.0060.03516.89
8.0.140.0060.03516.73
8.0.130.0030.03613.41
8.0.120.0070.03516.84
8.0.110.0000.04216.94
8.0.100.0000.04116.77
8.0.90.0030.03816.89
8.0.80.0070.04116.78
8.0.70.0030.03916.91
8.0.60.0030.03916.96
8.0.50.0000.04116.83
8.0.30.0120.04016.89
8.0.20.0090.04417.27
8.0.10.0070.04117.04
8.0.00.0110.03916.95
7.4.300.0060.01816.39
7.4.290.0000.04416.65
7.4.280.0060.03916.50
7.4.270.0000.04316.61
7.4.260.0000.04416.58
7.4.250.0000.04416.45
7.4.240.0050.03916.50
7.4.230.0000.04316.63
7.4.220.0000.05316.64
7.4.210.0130.05816.59
7.4.200.0000.04316.39
7.4.160.0130.04316.54
7.4.150.0060.04916.98
7.4.140.0110.04417.42
7.4.130.0090.05216.49
7.4.120.0120.04616.48
7.4.110.0120.05816.55
7.4.100.0090.04116.56
7.4.90.0030.04616.40
7.4.80.0080.05317.99
7.4.70.0080.04116.57
7.4.60.0110.04816.45
7.4.50.0030.03716.31
7.4.40.0080.04116.40
7.4.30.0080.05416.53
7.4.20.0000.04916.34
7.4.10.0090.04715.36
7.4.00.0080.04615.26
7.3.330.0070.03613.31
7.3.320.0030.03913.25
7.3.310.0030.04116.49
7.3.300.0000.04416.35
7.3.290.0040.05116.37
7.3.280.0100.05016.32
7.3.270.0130.05216.92
7.3.260.0110.05616.29
7.3.250.0080.05516.42
7.3.240.0100.05416.29
7.3.230.0060.04616.38
7.3.220.0130.03616.32
7.3.210.0080.04516.41
7.3.200.0080.04517.84
7.3.190.0110.04216.46
7.3.180.0080.05316.32
7.3.170.0100.04416.26
7.3.160.0050.04516.21
7.3.150.0070.04116.32
7.3.140.0000.05116.29
7.3.130.0080.04915.16
7.3.120.0060.05015.24
7.3.110.0070.04915.05
7.3.100.0090.04714.94
7.3.90.0090.04715.07
7.3.80.0070.04415.06
7.3.70.0100.05014.98
7.3.60.0080.05514.97
7.3.50.0100.04815.03
7.3.40.0090.04714.92
7.3.30.0090.04314.89
7.3.20.0100.05015.06
7.3.10.0110.04115.08
7.3.00.0080.04414.99
7.2.340.0120.05216.39
7.2.330.0180.04416.35
7.2.320.0140.04716.45
7.2.310.0150.06016.45
7.2.300.0100.04916.46
7.2.290.0180.04316.36
7.2.280.0130.05016.37
7.2.270.0200.04616.32
7.2.260.0110.06015.30
7.2.250.0130.05515.46
7.2.240.0080.05115.13
7.2.230.0100.05115.21
7.2.220.0140.05015.28
7.2.210.0110.04815.16
7.2.200.0110.05215.28
7.2.190.0110.04715.21
7.2.180.0100.04915.17
7.2.170.0060.05215.26
7.2.160.0100.04915.21
7.2.150.0130.05015.37
7.2.140.0090.05015.16
7.2.130.0160.04715.36
7.2.120.0110.05115.35
7.2.110.0260.04615.23
7.2.100.0070.05415.27
7.2.90.0340.05115.34
7.2.80.0090.05015.27
7.2.70.0130.04715.32
7.2.60.0130.04415.59
7.2.50.0110.05015.28
7.2.40.0100.05815.28
7.2.30.0090.04915.24
7.2.20.0140.05515.28
7.2.10.0130.04915.28
7.2.00.0080.06216.43
7.1.330.0240.05814.31
7.1.320.0170.06014.24
7.1.310.0100.05114.31
7.1.300.0070.05514.22
7.1.290.0130.05614.15
7.1.280.0150.05814.15
7.1.270.0140.05414.20
7.1.260.0100.05314.29
7.1.250.0090.05314.16
7.1.240.0190.05114.18
7.1.230.0200.06114.06
7.1.220.0120.05414.31
7.1.210.0110.06014.15
7.1.200.0160.05714.55
7.1.190.0170.05214.19
7.1.180.0140.05214.25
7.1.170.0140.05414.14
7.1.160.0180.05814.15
7.1.150.0100.05514.13
7.1.140.0150.05414.18
7.1.130.0180.05914.05
7.1.120.0110.05714.93
7.1.110.0130.05214.96
7.1.100.0150.05414.94
7.1.90.0160.05414.89
7.1.80.0160.06314.88
7.1.70.0130.05215.04
7.1.60.0110.05717.66
7.1.50.0120.06017.60
7.1.40.0140.05617.44
7.1.30.0130.06817.46
7.1.20.0150.05517.47
7.1.10.0140.05114.85
7.1.00.0140.05315.02
7.0.330.0130.05413.83
7.0.320.0150.05413.81
7.0.310.0160.05813.76
7.0.300.0150.05113.67
7.0.290.0150.06713.77
7.0.280.0350.05213.73
7.0.270.0130.05113.76
7.0.260.0150.05414.63
7.0.250.0120.05914.49
7.0.240.0140.05314.61
7.0.230.0190.06514.64
7.0.220.0100.06214.55
7.0.210.0130.05314.39
7.0.200.0120.05014.75
7.0.190.0160.06214.71
7.0.180.0140.05414.64
7.0.170.0130.05414.55
7.0.160.0160.05114.59
7.0.150.0110.05114.62
7.0.140.0130.05414.63
7.0.130.0130.05214.62
7.0.120.0100.05214.63
7.0.110.0140.05214.49
7.0.100.0140.04414.54
7.0.90.0110.05614.54
7.0.80.0130.04914.51
7.0.70.0110.04914.48
7.0.60.0130.04714.42
7.0.50.0090.05414.59
7.0.40.0220.05014.32
7.0.30.0110.05214.25
7.0.20.0100.06014.33
7.0.10.0140.05714.39
7.0.00.0080.05514.27
5.6.400.0130.17314.68
5.6.390.0140.16314.72
5.6.380.0160.15914.71
5.6.370.0140.14814.74
5.6.360.0170.15114.58
5.6.350.0110.15614.77
5.6.340.0140.18014.69
5.6.330.0120.16214.62
5.6.320.0100.17214.64
5.6.310.0150.15814.83
5.6.300.0130.14816.50
5.6.290.0140.16916.50
5.6.280.0140.15816.46
5.6.270.0120.15116.52
5.6.260.0130.15416.50
5.6.250.0130.17316.50
5.6.240.0130.15716.42
5.6.230.0130.18816.45
5.6.220.0130.16216.53
5.6.210.0140.19916.48
5.6.200.0130.16016.43
5.6.190.0120.16216.46
5.6.180.0120.16816.46
5.6.170.0140.18616.54
5.6.160.0160.16616.47
5.6.150.0130.15216.49
5.6.140.0140.15816.44
5.6.130.0140.16616.43
5.6.120.0080.16216.47
5.6.110.0140.15816.48
5.6.100.0120.17216.42
5.6.90.0110.16116.41
5.6.80.0140.15416.20
5.6.70.0140.16516.21
5.6.60.0120.16516.29
5.6.50.0090.15716.14
5.6.40.0170.15716.18
5.6.30.0160.17016.21
5.6.20.0120.18416.19
5.6.10.0120.15916.24
5.6.00.0100.18516.20
5.5.380.0180.18315.58
5.5.370.0120.15315.54
5.5.360.0140.16815.45
5.5.350.0120.16415.44
5.5.340.0140.16615.61
5.5.330.0120.16815.59
5.5.320.0130.17015.51
5.5.310.0150.17715.56
5.5.300.0160.16015.63
5.5.290.0160.15815.56
5.5.280.0120.14515.70
5.5.270.0120.16315.61
5.5.260.0140.18415.65
5.5.250.0160.15715.57
5.5.240.0110.17015.33
5.5.230.0140.17815.28
5.5.220.0110.15915.41
5.5.210.0100.15815.46
5.5.200.0160.16715.39
5.5.190.0120.17015.31
5.5.180.0150.17015.38
5.5.170.0140.15614.48
5.5.160.0130.17815.33
5.5.150.0140.15915.35
5.5.140.0170.14915.29
5.5.130.0130.15315.27
5.5.120.0120.17215.31
5.5.110.0130.15815.29
5.5.100.0110.19115.30
5.5.90.0130.17615.39
5.5.80.0220.16915.26
5.5.70.0130.16215.22
5.5.60.0150.16715.29
5.5.50.0120.14715.35
5.5.40.0120.18215.24
5.5.30.0100.17315.37
5.5.20.0110.16715.30
5.5.10.0150.15115.22
5.5.00.0140.17015.29
5.4.450.0140.16114.34
5.4.440.0110.17714.34
5.4.430.0100.15614.33
5.4.420.0100.16414.38
5.4.410.0150.16014.34
5.4.400.0140.19514.29
5.4.390.0120.16814.24
5.4.380.0100.17114.22
5.4.370.0120.17814.25
5.4.360.0110.16614.23
5.4.350.0110.17914.26
5.4.340.0080.16214.24
5.4.330.0150.16012.34
5.4.320.0090.15914.23
5.4.310.0150.20214.27
5.4.300.0120.17914.25
5.4.290.0070.17814.22
5.4.280.0110.15614.27
5.4.270.0130.15314.24
5.4.260.0110.16714.22
5.4.250.0130.17414.22
5.4.240.0100.17614.25
5.4.230.0210.19214.20
5.4.220.0110.16614.24
5.4.210.0090.16814.19
5.4.200.0190.16714.21
5.4.190.0110.17914.23
5.4.180.0110.17114.22
5.4.170.0100.16414.24
5.4.160.0090.18614.22
5.4.150.0100.17414.19
5.4.140.0140.17413.50
5.4.130.0100.17013.49
5.4.120.0150.18013.56
5.4.110.0120.18313.51
5.4.100.0130.18013.56
5.4.90.0120.17913.56
5.4.80.0100.18213.51
5.4.70.0130.17213.54
5.4.60.0140.17013.60
5.4.50.0090.16013.52
5.4.40.0090.17613.54
5.4.30.0110.18113.53
5.4.20.0120.18113.51
5.4.10.0140.16913.56
5.4.00.0130.18413.37
5.3.290.0150.00412.98
5.3.280.0130.00712.54
5.3.270.0140.00412.64
5.3.260.0160.00812.77
5.3.250.0110.00612.66
5.3.240.0110.01112.56
5.3.230.0170.00512.78
5.3.220.0130.01012.68
5.3.210.0130.01812.88
5.3.200.0170.00612.71
5.3.190.0100.01012.73
5.3.180.0110.01112.99
5.3.170.0180.00012.82
5.3.160.0200.00012.86
5.3.150.0120.00612.78
5.3.140.0160.00612.72
5.3.130.0160.00313.00
5.3.120.0230.00012.66
5.3.110.0100.01012.84
5.3.100.0120.01012.84
5.3.90.0140.00712.82
5.3.80.0180.00312.69
5.3.70.0220.00312.70
5.3.60.0160.00312.78
5.3.50.0130.00912.75
5.3.40.0140.01112.62
5.3.30.0160.00612.80
5.3.20.0150.00712.61
5.3.10.0120.00812.47
5.3.00.0160.00612.41
5.2.170.0130.00411.80
5.2.160.0130.00311.88
5.2.150.0150.00411.73
5.2.140.0090.00611.71
5.2.130.0130.00311.68
5.2.120.0090.00911.85
5.2.110.0170.00811.71
5.2.100.0160.00011.67
5.2.90.0130.00411.82
5.2.80.0130.00411.66
5.2.70.0130.00411.72
5.2.60.0090.00611.73
5.2.50.0120.00611.73
5.2.40.0080.00811.92
5.2.30.0070.01311.64
5.2.20.0110.00711.46
5.2.10.0120.00611.73
5.2.00.0080.01211.61
5.1.60.0100.00511.34
5.1.50.0120.00511.34
5.1.40.0100.00511.34
5.1.30.0080.00811.34
5.1.20.0100.00811.34
5.1.10.0110.00411.34
5.1.00.0170.00011.34
5.0.50.0210.00311.34
5.0.40.0080.00511.34
5.0.30.0040.00711.34
5.0.20.0060.00611.34
5.0.10.0060.00611.34
5.0.00.0120.00211.34
4.4.90.0060.00311.34
4.4.80.0040.00411.34
4.4.70.0060.00011.34
4.4.60.0040.00411.34
4.4.50.0050.00311.34
4.4.40.0100.00011.34
4.4.30.0100.00011.34
4.4.20.0040.00411.34
4.4.10.0080.00011.34
4.4.00.0050.00311.34
4.3.110.0050.00211.34
4.3.100.0080.00011.34
4.3.90.0080.00011.34
4.3.80.0090.00011.34
4.3.70.0060.00311.34
4.3.60.0090.00011.34
4.3.50.0040.00411.34
4.3.40.0080.00011.34
4.3.30.0070.00011.34
4.3.20.0040.00411.34
4.3.10.0060.00011.34
4.3.00.0050.00311.34

preferences:
14.77 ms | 406 KiB | 5 Q