3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numeric = ['foo', 'bar', 'qux']; $assoc = ['foo' => 'something', 'bar' => 'else', 'qux' => 'ya']; $fakeNumeric = ['foo', '1' => 'bar', 'qux']; function isNumericKey(array $array) { return is_numeric(implode(array_keys($array))); } var_dump(isNumericKey($numeric)); var_dump(isNumericKey($assoc)); var_dump(isNumericKey($fakeNumeric));

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.3.70.0120.00318.21
8.3.60.0170.00316.63
8.3.50.0090.00621.93
8.3.40.0110.01118.54
8.3.30.0170.00318.96
8.3.20.0040.00420.33
8.3.10.0040.00423.52
8.3.00.0040.00419.24
8.2.180.0130.00318.29
8.2.170.0110.00422.96
8.2.160.0130.00320.35
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0000.00820.96
8.2.110.0060.00322.08
8.2.100.0090.00317.91
8.2.90.0000.00817.78
8.2.80.0000.00817.97
8.2.70.0030.00517.38
8.2.60.0000.00817.79
8.2.50.0060.00318.07
8.2.40.0000.00919.76
8.2.30.0040.00418.26
8.2.20.0040.00417.64
8.2.10.0040.00418.00
8.2.00.0040.00417.45
8.1.280.0110.00425.92
8.1.270.0030.00623.91
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.42
8.1.230.0070.00420.97
8.1.220.0060.00317.74
8.1.210.0090.00018.90
8.1.200.0060.00617.13
8.1.190.0030.00517.10
8.1.180.0030.00618.10
8.1.170.0040.00418.50
8.1.160.0040.00421.95
8.1.150.0030.00618.55
8.1.140.0000.00817.40
8.1.130.0000.00717.71
8.1.120.0030.00317.36
8.1.110.0070.00017.30
8.1.100.0000.00717.27
8.1.90.0070.00417.31
8.1.80.0090.00017.44
8.1.70.0070.00017.30
8.1.60.0000.00917.46
8.1.50.0040.00417.57
8.1.40.0000.00817.42
8.1.30.0080.00017.59
8.1.20.0040.00417.66
8.1.10.0040.00417.52
8.1.00.0000.00817.41
8.0.300.0070.00019.73
8.0.290.0050.00217.04
8.0.280.0040.00418.33
8.0.270.0000.00717.13
8.0.260.0000.00617.08
8.0.250.0000.00716.97
8.0.240.0050.00316.88
8.0.230.0060.00016.81
8.0.220.0040.00416.86
8.0.210.0030.00316.80
8.0.200.0000.00616.83
8.0.190.0000.00816.80
8.0.180.0000.00816.74
8.0.170.0080.00016.86
8.0.160.0000.00716.71
8.0.150.0000.00716.87
8.0.140.0040.00416.80
8.0.130.0000.00513.30
8.0.120.0040.00416.79
8.0.110.0050.00316.83
8.0.100.0040.00416.84
8.0.90.0040.00416.82
8.0.80.0070.01016.79
8.0.70.0000.00716.84
8.0.60.0040.00316.88
8.0.50.0080.00016.96
8.0.30.0090.00917.15
8.0.20.0120.00617.41
8.0.10.0000.00716.98
8.0.00.0070.01416.84
7.4.330.0020.00215.00
7.4.320.0030.00316.38
7.4.300.0000.00616.50
7.4.290.0030.00316.52
7.4.280.0040.00416.49
7.4.270.0000.00716.53
7.4.260.0000.00716.50
7.4.250.0040.00416.49
7.4.240.0020.00516.50
7.4.230.0030.00316.31
7.4.220.0110.00716.54
7.4.210.0090.01016.49
7.4.200.0080.00016.54
7.4.190.0060.00316.70
7.4.160.0130.00316.38
7.4.150.0070.01117.40
7.4.140.0100.00717.86
7.4.130.0060.01116.37
7.4.120.0070.01016.37
7.4.110.0060.00916.39
7.4.100.0130.01316.47
7.4.90.0100.00716.46
7.4.80.0150.00319.39
7.4.70.0120.00616.34
7.4.60.0090.01316.59
7.4.50.0040.00416.50
7.4.40.0150.00416.59
7.4.30.0090.00616.38
7.4.00.0000.00715.02
7.3.330.0020.00213.21
7.3.320.0030.00413.09
7.3.310.0040.00416.23
7.3.300.0000.00716.13
7.3.290.0070.00716.24
7.3.280.0100.00816.24
7.3.270.0200.00317.40
7.3.260.0090.00916.36
7.3.250.0090.01116.33
7.3.240.0120.00616.35
7.3.230.0140.00816.39
7.3.210.0150.00316.42
7.3.200.0000.01719.39
7.3.190.0120.00916.58
7.3.180.0110.00416.25
7.3.170.0060.01016.27
7.3.160.0070.01016.28
7.3.120.0030.01214.69
7.2.330.0120.00616.55
7.2.320.0100.01016.25
7.2.310.0030.01316.48
7.2.300.0120.00416.55
7.2.290.0030.01416.64
7.1.200.0000.00815.90
7.1.70.0000.00817.27
7.1.60.0120.00319.46
7.1.50.0000.02116.95
7.1.00.0030.07722.43
7.0.200.0070.00016.34
7.0.140.0100.06722.00
7.0.60.0130.07320.02
7.0.50.0030.04717.72
7.0.40.0130.03320.25
7.0.30.0200.04020.30
7.0.20.0300.07320.21
7.0.10.0000.05720.23
7.0.00.0170.04720.33
5.6.280.0030.07321.15
5.6.210.0070.08020.71
5.6.200.0130.07318.16
5.6.190.0130.07320.63
5.6.180.0130.06320.33
5.6.170.0200.04320.45
5.6.160.0100.04020.54
5.6.150.0030.09018.16
5.6.140.0130.04318.18
5.6.130.0070.07318.17
5.6.120.0070.06721.01
5.6.110.0030.08320.99
5.6.100.0170.07321.05
5.6.90.0070.08021.01
5.6.80.0070.08020.43
5.5.350.4400.04320.47
5.5.340.0000.04718.03
5.5.330.0070.05720.27
5.5.320.0270.05720.20
5.5.310.0270.06720.32
5.5.300.0070.03717.98
5.5.290.0100.08317.98
5.5.280.0030.08720.66
5.5.270.0070.04020.79
5.5.260.0130.07720.87
5.5.250.0000.04320.61
5.5.240.0070.07720.02
5.4.450.0270.07319.17
5.4.440.0330.04719.54
5.4.430.0370.07019.63
5.4.420.0330.06019.54
5.4.410.0270.06019.50
5.4.400.0300.07018.88
5.4.390.0370.05019.04
5.4.380.0170.04319.21
5.4.370.0270.07319.30
5.4.360.0270.04319.15
5.4.350.0370.06018.87
5.4.340.0200.04019.00
5.4.320.0300.03018.99
5.4.310.0300.04319.24
5.4.300.0270.03718.86
5.4.290.0230.03719.22
5.4.280.0230.07019.03
5.4.270.0200.06019.21
5.4.260.0270.07318.85
5.4.250.0270.06318.94
5.4.240.0200.04319.30
5.4.230.0300.04019.20
5.4.220.0270.07719.07
5.4.210.0370.05019.07
5.4.200.0200.04019.15
5.4.190.0300.06719.20
5.4.180.0400.06018.93
5.4.170.0330.04719.30
5.4.160.0370.03719.29
5.4.150.0370.06019.17
5.4.140.0370.03716.42
5.4.130.0430.05016.66
5.4.120.0330.05716.51
5.4.110.0230.03716.51
5.4.100.0330.05016.55
5.4.90.0200.03716.45
5.4.80.0400.03316.53
5.4.70.0200.05016.43
5.4.60.0230.04716.50
5.4.50.0230.07316.16
5.4.40.0270.03316.43
5.4.30.0400.05716.23
5.4.20.0230.03716.50
5.4.10.0230.07716.23
5.4.00.0270.06015.75
5.3.290.0230.03714.60
5.3.280.0370.05314.54
5.3.270.0370.06314.46
5.3.260.0300.04314.44
5.3.250.0300.03714.55
5.3.240.0270.06014.60
5.3.230.0330.06714.50
5.3.220.0370.06314.39
5.3.210.0230.03714.44
5.3.200.0270.05314.61
5.3.190.0270.07314.47
5.3.180.0230.04714.41
5.3.170.0270.06714.41
5.3.160.0230.04714.41
5.3.150.0330.03714.50
5.3.140.0230.04014.40
5.3.130.0270.07314.39
5.3.120.0230.04314.39
5.3.110.0230.04714.45
5.3.100.0270.04013.99
5.3.90.0300.07013.86
5.3.80.0330.05713.87
5.3.70.0330.04013.92
5.3.60.0230.03313.88
5.3.50.0270.07013.92
5.3.40.0330.04313.89
5.3.30.0270.04713.86
5.3.20.0300.06013.63
5.3.10.0230.06713.45
5.3.00.0270.04013.49
5.2.170.0270.05011.57
5.2.160.0300.03311.57
5.2.150.0200.05711.57
5.2.140.0200.04011.57
5.2.130.0230.03311.57
5.2.120.0200.05011.57
5.2.110.0300.02711.57
5.2.100.0230.03711.57
5.2.90.0200.04011.57
5.2.80.0230.05311.57
5.2.70.0270.03011.57
5.2.60.0330.02011.57
5.2.50.0170.03311.57
5.2.40.0170.02711.57
5.2.30.0230.05311.57
5.2.20.0270.05011.57
5.2.10.0130.03311.57
5.2.00.0170.06011.57
5.1.60.0200.05011.57
5.1.50.0200.03011.57
5.1.40.0270.04011.57
5.1.30.0170.04711.57
5.1.20.0170.03011.57
5.1.10.0230.04711.57
5.1.00.0130.02711.57
5.0.50.0100.04711.57
5.0.40.0100.02311.57
5.0.30.0100.05711.57
5.0.20.0030.02311.57
5.0.10.0100.01711.57
5.0.00.0030.03711.57
4.4.90.0130.02311.57
4.4.80.0100.01311.57
4.4.70.0100.03011.57
4.4.60.0100.03311.57
4.4.50.0130.01711.57
4.4.40.0100.05011.57
4.4.30.0100.02311.57
4.4.20.0100.01311.57
4.4.10.0070.01711.57
4.4.00.0100.05311.57
4.3.110.0170.02711.57
4.3.100.0170.02011.57
4.3.90.0100.01311.57
4.3.80.0070.03711.57
4.3.70.0070.02711.57
4.3.60.0100.02311.57
4.3.50.0070.01711.57
4.3.40.0070.03011.57
4.3.30.0030.01711.57
4.3.20.0070.02711.57
4.3.10.0030.02011.57
4.3.00.0030.03011.57

preferences:
58.39 ms | 401 KiB | 5 Q