3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numeric_fails = 0; $non_numeric_fails = 0; $iterations = 1000; for ($i = 0; $i < $iterations; $i++) { $my_key = uniqid("\x00"); $var = array(); $var[$my_key] = TRUE; foreach ($var as $key => $val) { if ($key === $my_key) { } else { if (is_numeric($my_key)) { $numeric_fails++; } else { $non_numeric_fails++; } } } } print "Had failures with non-numeric keys: ".($non_numeric_fails ? 'Yes' : 'No')."\n"; print "Had failures with numeric keys: ".($numeric_fails ? 'Yes' : 'No')."\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.3.10.0000.01016.46
7.3.00.0080.00816.60
7.2.130.0040.00816.78
7.2.120.0090.00616.86
7.2.110.0060.01016.89
7.2.100.0070.00816.83
7.2.90.0020.01316.82
7.2.80.0060.00916.85
7.2.70.0090.00816.96
7.2.60.0030.01417.04
7.2.50.0050.01016.91
7.2.40.0050.01116.93
7.2.30.0030.01017.04
7.2.20.0040.00717.09
7.2.10.0060.00916.99
7.2.00.0090.00717.76
7.1.250.0100.00715.85
7.1.240.0100.00716.02
7.1.230.0080.00815.45
7.1.220.0130.00715.79
7.1.210.0130.00315.82
7.1.200.0030.01815.54
7.1.190.0130.00415.54
7.1.180.0110.01115.47
7.1.170.0080.01215.71
7.1.160.0080.00815.79
7.1.150.0100.01015.89
7.1.140.0060.01415.53
7.1.130.0060.01415.85
7.1.120.0090.01015.84
7.1.110.0160.00315.63
7.1.100.0040.01215.65
7.1.90.0070.01415.99
7.1.80.0080.01215.72
7.1.70.0040.01216.33
7.1.60.0100.00917.65
7.1.50.0110.01016.28
7.1.40.0140.00515.75
7.1.30.0150.00516.03
7.1.20.0090.00915.54
7.1.10.0070.01316.05
7.1.00.0060.04718.99
7.0.320.0090.01215.23
7.0.310.0100.01015.29
7.0.300.0070.01415.59
7.0.290.0080.00815.46
7.0.280.0060.00915.46
7.0.270.0150.00515.33
7.0.260.0080.01215.64
7.0.250.0170.00315.54
7.0.240.0110.00815.39
7.0.230.0100.00615.56
7.0.220.0130.00715.24
7.0.210.0070.01315.32
7.0.200.0080.00616.19
7.0.190.0110.00415.54
7.0.180.0120.00615.22
7.0.170.0080.01115.43
7.0.160.0140.00515.51
7.0.150.0000.01815.50
7.0.140.0020.04918.72
7.0.130.0140.00715.59
7.0.120.0140.00715.57
7.0.110.0050.01415.55
7.0.100.0090.00915.47
7.0.90.0120.00815.49
7.0.80.0070.01415.55
7.0.70.0080.01015.38
7.0.60.0100.04617.77
7.0.50.0110.02216.79
7.0.40.0120.04916.58
7.0.30.0220.02616.87
7.0.20.0240.03416.77
7.0.10.0120.03416.62
7.0.00.0050.05216.84
5.6.380.0030.01814.57
5.6.370.0090.00914.29
5.6.360.0110.01114.44
5.6.350.0080.01114.68
5.6.340.0070.01514.58
5.6.330.0150.00514.52
5.6.320.0080.01414.48
5.6.310.0090.01114.02
5.6.300.0170.00214.59
5.6.290.0080.01114.70
5.6.280.0110.04117.97
5.6.270.0120.00814.59
5.6.260.0090.01214.47
5.6.250.0100.01214.40
5.6.240.0110.01114.32
5.6.230.0050.01414.30
5.6.220.0050.01314.52
5.6.210.0070.05017.63
5.6.200.0130.04716.31
5.6.190.0080.05317.52
5.6.180.0170.04517.47
5.6.170.0210.02517.48
5.6.160.0070.04917.35
5.6.150.0050.04016.26
5.6.140.0150.03516.44
5.6.130.0160.04116.21
5.6.120.0070.04317.82
5.6.110.0100.05017.65
5.6.100.0130.03217.64
5.6.90.0030.03217.75
5.6.80.0060.05117.35
5.6.70.2170.02517.40
5.6.60.0160.00514.27
5.6.50.0170.00414.44
5.6.40.0130.00814.43
5.6.30.0100.01314.47
5.6.20.0120.00814.23
5.6.10.0150.00414.34
5.6.00.0150.00514.44
5.5.380.0000.01511.27
5.5.370.0150.00411.27
5.5.360.0080.00811.27
5.5.350.0100.04915.88
5.5.340.0060.02614.68
5.5.330.0150.02815.99
5.5.320.0200.03815.77
5.5.310.0150.03815.84
5.5.300.0150.03814.64
5.5.290.0080.05014.65
5.5.280.0080.05016.03
5.5.270.0100.04616.08
5.5.260.0110.04315.96
5.5.250.0140.04216.02
5.5.240.2070.02315.69
5.5.230.0060.01111.27
5.5.220.0040.01311.27
5.5.210.0060.00611.37
5.5.200.0130.00511.27
5.5.190.0110.00611.27
5.5.180.0100.00711.27
5.5.170.0070.01414.35
5.5.160.0090.00911.27
5.5.150.0100.01011.29
5.5.140.0080.00811.28
5.5.130.0170.00011.27
5.5.120.0040.01211.33
5.5.110.0120.00611.27
5.5.100.0100.00711.27
5.5.90.0040.01211.27
5.5.80.0170.00011.27
5.5.70.0090.00911.27
5.5.60.0080.00811.27
5.5.50.0030.01411.27
5.5.40.0110.00711.27
5.5.30.0180.00011.27
5.5.20.0170.00011.27
5.5.10.0090.00911.27
5.5.00.0080.01211.27
5.4.450.0120.03615.45
5.4.440.0300.03715.42
5.4.430.0250.02315.33
5.4.420.0130.02715.40
5.4.410.0190.02815.31
5.4.400.0110.03115.17
5.4.390.0280.02815.20
5.4.380.0310.04315.00
5.4.370.0350.03614.96
5.4.360.0280.03714.97
5.4.350.0220.04214.98
5.4.340.0220.03914.88
5.4.330.0140.00511.27
5.4.320.0090.03311.86
5.4.310.0090.02711.86
5.4.300.0060.03211.87
5.4.290.0110.02911.91
5.4.280.0150.03511.81
5.4.270.0160.03711.81
5.4.260.0220.06811.81
5.4.250.0250.06311.86
5.4.240.0110.03211.81
5.4.230.0170.04611.82
5.4.220.0140.03611.81
5.4.210.0170.04111.80
5.4.200.0130.03611.80
5.4.190.0160.03411.80
5.4.180.0150.03411.80
5.4.170.0130.03711.81
5.4.160.0120.04211.81
5.4.150.0220.03411.81
5.4.140.0160.03011.69
5.4.130.0220.04311.64
5.4.120.0080.04211.62
5.4.110.0100.03711.62
5.4.100.0140.02911.62
5.4.90.0150.03011.62
5.4.80.0120.03611.62
5.4.70.0130.02911.62
5.4.60.0120.03211.63
5.4.50.0140.03111.62
5.4.40.0120.03811.61
5.4.30.0170.03711.63
5.4.20.0180.04311.61
5.4.10.0150.03211.61
5.4.00.0130.04411.35
5.3.290.0200.04012.04
5.3.280.0150.03311.99
5.3.270.0140.04812.00
5.3.260.0170.03312.00
5.3.250.0110.04311.99
5.3.240.0090.04311.99
5.3.230.0130.03611.99
5.3.220.0170.02911.97
5.3.210.0110.03011.97
5.3.200.0110.02811.97
5.3.190.0090.03511.97
5.3.180.0060.03511.97
5.3.170.0080.03611.97
5.3.160.0110.03111.97
5.3.150.0130.03811.97
5.3.140.0140.03111.96
5.3.130.0110.02811.96
5.3.120.0090.02911.96
5.3.110.0120.02711.96
5.3.100.0100.02811.69
5.3.90.0090.02711.68
5.3.80.0100.02811.67
5.3.70.0130.02411.67
5.3.60.0090.02711.67
5.3.50.0090.02911.63
5.3.40.0130.02511.63
5.3.30.0120.03211.61
5.3.20.0090.03611.50
5.3.10.0110.05311.48
5.3.00.0090.03311.47
5.2.170.0190.03710.23
5.2.160.0070.03410.23
5.2.150.0100.02610.23
5.2.140.0090.02810.22
5.2.130.0140.02110.21
5.2.120.0120.02510.20
5.2.110.0080.02410.21
5.2.100.0080.02510.21
5.2.90.0060.02710.21
5.2.80.0150.02710.21
5.2.70.0140.03010.21
5.2.60.0110.02810.18
5.2.50.0070.02710.16
5.2.40.0110.02710.15
5.2.30.0110.02210.14
5.2.20.0120.01810.14
5.2.10.0070.02310.10
5.2.00.0100.02210.03
5.1.60.0100.0179.67
5.1.50.0080.0199.67
5.1.40.0110.0189.66
5.1.30.0070.0229.83
5.1.20.0080.0229.84
5.1.10.0070.0249.71
5.1.00.0110.0219.71
5.0.50.0070.0208.95
5.0.40.0110.0178.88
5.0.30.0100.0238.79
5.0.20.0050.0238.77
5.0.10.0070.0218.76
5.0.00.0050.0298.76
4.4.90.0080.0188.02
4.4.80.0050.0208.01
4.4.70.0080.0188.01
4.4.60.0090.0158.01
4.4.50.0070.0178.02
4.4.40.0100.0197.99
4.4.30.0080.0168.02
4.4.20.0100.0158.06
4.4.10.0060.0188.06
4.4.00.0100.0198.02
4.3.110.0080.0187.97
4.3.100.0060.0227.97
4.3.90.0070.0197.95
4.3.80.0030.0307.93
4.3.70.0070.0277.95
4.3.60.0070.0177.95
4.3.50.0070.0217.95
4.3.40.0070.0257.90
4.3.30.0080.0177.29
4.3.20.0050.0207.28
4.3.10.0070.0187.26
4.3.00.0060.01512.61

preferences:
32.92 ms | 401 KiB | 5 Q