3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 1000000; // Create test array $i = 0; $array = array(); while($i < $n) { $array[$i++] = true; } $time_start = microtime(true); $i = 0; while ($i < $n) { $devnull = array_key_exists($i++, $array); } $time_end = microtime(true); $time_while1= $time_end-$time_start; echo number_format($time_while1, 3, '.', '') ." seconds - array_key_exists(array,i) on full array \n";

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.0550.06147.71
7.4.00.0340.06647.62
7.3.130.0430.08547.54
7.3.120.0350.08647.80
7.3.110.0300.10047.59
7.3.100.0300.06547.85
7.3.90.0360.09448.04
7.3.80.0360.06147.73
7.3.70.0180.07347.95
7.3.60.0400.06247.72
7.3.50.0250.06847.71
7.3.40.0300.07247.68
7.3.30.0260.08147.70
7.3.20.0290.05950.58
7.3.10.0250.06350.59
7.3.00.0180.06250.62
7.2.260.0500.06447.95
7.2.250.0420.08048.05
7.2.240.0250.08347.98
7.2.230.0330.07847.92
7.2.220.0350.08847.73
7.2.210.0360.05847.97
7.2.200.0250.07647.93
7.2.190.0350.06947.96
7.2.180.0280.06547.83
7.2.170.0280.06947.99
7.2.160.0260.06647.97
7.2.150.0220.06750.71
7.2.140.0100.07550.66
7.2.130.0130.07150.44
7.2.120.0160.05950.88
7.2.110.0100.07750.50
7.2.100.0260.07950.92
7.2.90.0170.06250.75
7.2.80.0130.06650.93
7.2.70.0190.05550.94
7.2.60.0170.07450.69
7.2.50.0100.08550.91
7.2.40.0130.08150.52
7.2.30.0100.07050.85
7.2.20.0200.05450.59
7.2.10.0140.09150.67
7.2.00.0200.05652.11
7.1.330.0100.12449.42
7.1.320.0180.16149.73
7.1.310.0080.13949.84
7.1.300.0130.12249.75
7.1.290.0120.13049.84
7.1.280.0280.14249.61
7.1.270.0150.13249.73
7.1.260.0120.13049.72
7.1.250.0100.13649.87
7.1.240.0270.17149.73
7.1.230.0360.14949.82
7.1.220.0230.13749.43
7.1.210.0130.12049.46
7.1.200.0200.13549.66
7.1.190.0230.14649.77
7.1.180.0070.14249.73
7.1.170.0140.14549.79
7.1.160.0200.12249.71
7.1.150.0200.13749.58
7.1.140.0230.13249.52
7.1.130.0230.16649.51
7.1.120.0330.13249.45
7.1.110.0260.11449.80
7.1.100.0300.16149.75
7.1.90.0330.16849.64
7.1.80.0200.13649.67
7.1.70.0150.10150.43
7.1.60.0150.10550.57
7.1.50.0170.09750.37
7.1.40.0170.12649.94
7.1.30.0070.13949.52
7.1.20.0100.13749.74
7.1.10.0140.14249.64
7.1.00.0130.15452.95
7.0.330.0300.17849.29
7.0.320.0230.13449.49
7.0.310.0170.12649.41
7.0.300.0170.12749.34
7.0.290.0230.14649.25
7.0.280.0200.15449.36
7.0.270.0270.16649.42
7.0.260.0230.16049.34
7.0.250.0170.14249.48
7.0.240.0170.17649.59
7.0.230.0200.17149.41
7.0.220.0200.12049.41
7.0.210.0200.12249.24
7.0.200.0680.10348.88
7.0.190.0200.13349.42
7.0.180.0360.14549.41
7.0.170.0260.13549.19
7.0.160.0230.13749.48
7.0.150.0170.17649.27
7.0.140.0170.15652.61
7.0.130.0130.17749.45
7.0.120.0140.13549.47
7.0.110.0260.16549.30
7.0.100.0270.15549.32
7.0.90.0170.15549.42
7.0.80.0130.16849.46
7.0.70.0200.15549.21
7.0.60.0600.13351.51
7.0.50.0250.14450.15
7.0.40.0170.13749.65
7.0.30.0560.10849.49
7.0.20.0550.12849.63
7.0.10.0600.13549.51
7.0.00.0120.12449.56
5.6.400.0240.11178.92
5.6.390.0390.11379.01
5.6.380.0390.09879.26
5.6.370.0370.11479.13
5.6.360.0400.11878.93
5.6.350.0270.11079.00
5.6.340.0260.10979.01
5.6.330.0430.13778.93
5.6.320.0340.14478.98
5.6.310.0390.10479.25
5.6.300.0470.15479.23
5.6.290.0420.10279.12
5.6.280.0220.13382.30
5.6.270.0410.11878.92
5.6.260.0490.09579.35
5.6.250.0400.11078.98
5.6.240.0460.12178.98
5.6.230.0420.12778.90
5.6.220.0510.09078.97
5.6.210.0280.15582.27
5.6.200.0280.11080.78
5.6.190.0300.14181.96
5.6.180.0200.12381.98
5.6.170.0530.12281.96
5.6.160.0420.14081.91
5.6.150.0370.11380.85
5.6.140.0290.12881.00
5.6.130.0280.14580.83
5.6.120.0330.13582.26
5.6.110.0320.12582.46
5.6.100.0380.11682.54
5.6.90.0360.12582.27
5.6.80.0310.13581.94
5.6.70.0440.10178.73
5.6.60.0200.13078.89
5.6.50.0410.14279.27
5.6.40.0430.14278.86
5.6.30.0270.12478.73
5.6.20.0200.12378.94
5.6.10.0340.10879.00
5.6.00.0470.09378.91
5.5.380.0270.13078.94
5.5.370.0360.13579.13
5.5.360.0600.10078.73
5.5.350.2400.09981.95
5.5.340.0300.10080.72
5.5.330.0320.13482.07
5.5.320.0350.13181.84
5.5.310.0320.10182.04
5.5.300.0250.13080.72
5.5.290.0450.10180.72
5.5.280.0380.14482.17
5.5.270.0250.14082.13
5.5.260.0330.12482.19
5.5.250.0360.13282.01
5.5.240.0350.12081.87
5.5.230.0340.13278.80
5.5.220.0270.11378.75
5.5.210.0470.08778.89
5.5.200.0470.13579.04
5.5.190.0300.13879.05
5.5.180.0260.12378.84
5.5.170.0300.14978.89
5.5.160.0340.13478.63
5.5.150.0330.13078.60
5.5.140.0230.10678.55
5.5.130.0360.11678.91
5.5.120.0330.10679.10
5.5.110.0170.14379.09
5.5.100.0370.10679.10
5.5.90.0290.12179.07
5.5.80.0330.12079.13
5.5.70.0360.13279.01
5.5.60.0520.10878.50
5.5.50.0630.11778.85
5.5.40.0400.12178.93
5.5.30.0300.11578.86
5.5.20.0460.10678.73
5.5.10.0300.09378.98
5.5.00.0390.11578.62
5.4.450.0330.11879.81
5.4.440.0600.11579.99
5.4.430.0510.11379.72
5.4.420.0450.11379.99
5.4.410.0500.11379.73
5.4.400.0600.10279.38
5.4.390.0380.12179.73
5.4.380.0380.12679.47
5.4.370.0530.12679.39
5.4.360.0450.12879.35
5.4.350.0300.14179.48
5.4.340.0480.12579.41
5.4.330.0330.13275.49
5.4.320.0250.11276.29
5.4.310.0310.10676.44
5.4.300.0330.11876.27
5.4.290.0320.10176.34
5.4.280.0330.09676.34
5.4.270.0250.10676.31
5.4.260.0280.11176.26
5.4.250.0390.11076.21
5.4.240.0310.10776.26
5.4.230.0200.12776.19
5.4.220.0290.11176.29
5.4.210.0410.14676.31
5.4.200.0420.13776.32
5.4.190.0330.14176.17
5.4.180.0300.13876.20
5.4.170.0270.12776.17
5.4.160.0330.11376.15
5.4.150.0350.13576.27
5.4.140.0350.14576.04
5.4.130.0290.10676.11
5.4.120.0320.10676.08
5.4.110.0300.09976.14
5.4.100.0270.11476.14
5.4.90.0240.11276.00
5.4.80.0190.12076.17
5.4.70.0380.11976.13
5.4.60.0320.12576.08
5.4.50.0380.14276.07
5.4.40.0390.13176.13
5.4.30.0250.10876.14
5.4.20.0300.09976.08
5.4.10.0320.10976.17
5.4.00.0420.10575.82
5.3.290.0160.12974.79
5.3.280.0320.12374.71
5.3.270.0410.13774.74
5.3.260.0330.14274.85
5.3.250.0410.14174.81
5.3.240.0270.11974.78
5.3.230.0260.12274.68
5.3.220.0400.13574.74
5.3.210.0280.12274.75
5.3.200.0290.12175.15
5.3.190.0290.11874.79
5.3.180.0300.12074.81
5.3.170.0290.11374.86
5.3.160.0380.12374.88
5.3.150.0200.13174.85
5.3.140.0240.12174.81
5.3.130.0270.13074.77
5.3.120.0280.12174.68
5.3.110.0230.14274.76
5.3.100.0390.12474.50
5.3.90.0290.10874.44
5.3.80.0290.11774.29
5.3.70.0260.10974.39
5.3.60.0220.12874.29
5.3.50.0260.10974.24
5.3.40.0280.13474.33
5.3.30.0260.11474.38
5.3.20.0220.11274.06
5.3.10.0200.13174.11
5.3.00.0300.10974.38
5.2.170.0230.11873.04
5.2.160.0270.18473.04
5.2.150.0270.12073.04
5.2.140.0270.12073.04
5.2.130.0230.11673.00
5.2.120.0240.12073.00
5.2.110.0180.12573.00
5.2.100.0190.11873.00
5.2.90.0240.11573.01
5.2.80.0210.11773.01
5.2.70.0150.12273.01
5.2.60.0240.12272.95
5.2.50.0170.16472.93
5.2.40.0240.15072.91
5.2.30.0210.15372.88
5.2.20.0270.14672.88
5.2.10.0270.10072.80
5.2.00.0330.380138.66
5.1.60.0460.400183.79
5.1.50.0620.434183.79
5.1.40.0670.381183.77
5.1.30.0600.435184.11
5.1.20.0500.428184.14
5.1.10.0490.422183.86
5.1.00.0530.451183.87
5.0.50.0660.863182.35
5.0.40.0660.963182.21
5.0.30.0770.837182.02
5.0.20.0660.940181.99
5.0.10.0600.860181.97
5.0.00.0560.838181.96
4.4.90.0500.783180.38
4.4.80.0680.780180.37
4.4.70.0800.761180.36
4.4.60.0650.765180.37
4.4.50.0510.826180.38
4.4.40.0480.813180.37
4.4.30.0530.781180.36
4.4.20.0530.806180.43
4.4.10.0510.800180.43
4.4.00.0630.834180.40
4.3.110.0590.813180.31
4.3.100.0871.055180.30
4.3.90.0680.831180.29
4.3.80.0560.850180.28
4.3.70.0570.850180.27
4.3.60.0490.797180.28
4.3.50.0480.788180.27
4.3.40.0500.772180.23
4.3.30.0550.790179.04
4.3.20.0530.801179.02
4.3.10.0550.758178.97
4.3.00.0700.773180.18

preferences:
37.8 ms | 400 KiB | 5 Q