3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 1000000; // First a test with a empty array $array = array(); $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 empty 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.2.00.0030.03819.31
7.1.70.0030.03316.88
7.1.60.0070.03519.70
7.1.50.0070.06516.73
7.1.00.0030.12022.41
7.0.200.0060.04516.37
7.0.140.0030.10721.92
7.0.60.0070.06319.89
7.0.50.0130.11717.88
7.0.40.0030.09319.90
7.0.30.0330.11320.00
7.0.20.0200.09720.09
7.0.10.0300.11320.20
7.0.00.0030.06720.21
5.6.280.0100.20021.13
5.6.210.0100.19720.72
5.6.200.0000.14718.22
5.6.190.0100.16320.39
5.6.180.0300.17320.59
5.6.170.0270.18720.54
5.6.160.0030.19720.46
5.6.150.0130.19018.13
5.6.140.0070.18318.16
5.6.130.0100.13018.10
5.6.120.0070.13320.95
5.6.110.0070.19721.01
5.6.100.0030.19721.11
5.6.90.0100.18720.97
5.6.80.0130.17020.39
5.6.70.0330.18020.39
5.5.350.0330.18320.40
5.5.340.0070.14317.93
5.5.330.0100.21320.15
5.5.320.0130.20020.57
5.5.310.0200.16020.16
5.5.300.0130.14017.91
5.5.290.0100.20017.96
5.5.280.0030.15320.68
5.5.270.0030.15320.76
5.5.260.0200.15320.87
5.5.250.0130.18320.70
5.5.240.0170.14320.15
5.4.450.0870.21019.64
5.4.440.0970.24719.22
5.4.430.0270.21019.54
5.4.420.0100.24019.38
5.4.410.0070.21718.98
5.4.400.0270.22718.72
5.4.390.2230.21018.76
5.4.380.0330.23318.62
5.4.370.0030.16718.46
5.4.360.0170.24318.63
5.4.350.0080.19011.98
5.4.340.0090.21911.98
5.4.320.0070.16112.46
5.4.310.0060.15812.46
5.4.300.0070.15212.46
5.4.290.0090.14812.45
5.4.280.0100.16812.36
5.4.270.0090.15312.36
5.4.260.0110.20712.36
5.4.250.0060.15212.35
5.4.240.0090.16612.36
5.4.230.0040.15412.35
5.4.220.0060.15312.35
5.4.210.0080.16612.34
5.4.200.0070.15312.35
5.4.190.0060.15712.34
5.4.180.0050.15312.34
5.4.170.0060.17512.36
5.4.160.0100.15212.35
5.4.150.0020.15312.35
5.4.140.0050.15312.03
5.4.130.0040.16012.02
5.4.120.0080.15111.98
5.4.110.0130.18511.97
5.4.100.0050.15411.97
5.4.90.0060.15611.96
5.4.80.0080.14511.97
5.4.70.0040.15211.96
5.4.60.0100.15111.96
5.4.50.0060.14911.96
5.4.40.0060.15111.95
5.4.30.0060.14811.95
5.4.20.0070.15211.95
5.4.10.0070.14611.95
5.4.00.0030.18511.44
5.3.290.0080.17012.80
5.3.280.0030.18812.71
5.3.270.0060.17512.73
5.3.260.0130.18112.72
5.3.250.0050.18112.72
5.3.240.0080.17812.72
5.3.230.0060.19012.71
5.3.220.0090.18412.68
5.3.210.0060.18212.68
5.3.200.0090.17612.68
5.3.190.0050.17712.68
5.3.180.0050.17312.67
5.3.170.0060.16812.67
5.3.160.0060.17312.68
5.3.150.0060.17112.67
5.3.140.0070.16912.66
5.3.130.0060.17612.66
5.3.120.0080.17312.66
5.3.110.0100.17312.66
5.3.100.0120.19712.12
5.3.90.0060.16512.09
5.3.80.0070.16412.08
5.3.70.0080.17912.08
5.3.60.0070.16712.06
5.3.50.0050.16912.00
5.3.40.0100.16712.00
5.3.30.0040.17011.95
5.3.20.0080.16311.73
5.3.10.0080.16511.70
5.3.00.0070.16611.68
5.2.170.0040.1919.21
5.2.160.0070.1779.22
5.2.150.0040.1779.22
5.2.140.0010.1819.21
5.2.130.0050.1759.18
5.2.120.0070.1769.18
5.2.110.0030.1879.18
5.2.100.0060.1789.18
5.2.90.0060.1789.18
5.2.80.0050.1779.18
5.2.70.0090.1819.18
5.2.60.0080.1739.13
5.2.50.0100.1899.10
5.2.40.0070.1889.08
5.2.30.0080.1789.05
5.2.20.0030.1809.04
5.2.10.0070.1958.96
5.2.00.0080.1808.82
5.1.60.0050.1848.11
5.1.50.0040.1698.10
5.1.40.0050.1728.08
5.1.30.0030.1648.43
5.1.20.0070.1688.46
5.1.10.0090.1638.18
5.1.00.0060.1698.18
5.0.50.0040.4266.66
5.0.40.0030.4086.51
5.0.30.0050.3686.33
5.0.20.0070.4106.30
5.0.10.0060.3726.28
5.0.00.0050.3896.27
4.4.90.0040.3854.78
4.4.80.0060.3824.76
4.4.70.0040.3974.75
4.4.60.0040.3734.75
4.4.50.0040.3994.77
4.4.40.0060.3934.71
4.4.30.0030.4124.75
4.4.20.0030.4294.85
4.4.10.0030.4154.85
4.4.00.0040.4154.76
4.3.110.0030.3934.67
4.3.100.0040.3854.67
4.3.90.0020.3854.64
4.3.80.0040.4394.62
4.3.70.0040.4024.63
4.3.60.0010.3974.63
4.3.50.0040.4164.63
4.3.40.0040.3874.53
4.3.30.0060.4003.33
4.3.20.0020.3793.31
4.3.10.0040.3813.27
4.3.00.0030.5307.15

preferences:
35.07 ms | 400 KiB | 5 Q