3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Check if variable is a numeric array. * * @param array|mixed $var * @return bool */ $b=array(1,2); function is_numeric_array($var): bool { if (!is_array($var)) { return false; } $keys = array_keys($var); return ($keys === array_keys($keys)); } var_dump(is_numeric_array($b));

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.4.30.0130.00320.44
8.4.20.0130.00718.54
8.4.10.0060.00317.78
8.3.160.0190.00017.29
8.3.150.0120.00317.07
8.3.140.0040.00416.54
8.3.130.0090.00618.36
8.3.120.0040.01120.59
8.3.110.0060.00316.50
8.3.100.0050.00324.06
8.3.90.0030.00626.77
8.3.80.0060.00318.24
8.3.70.0040.01116.58
8.3.60.0090.01218.30
8.3.50.0100.00718.75
8.3.40.0100.01018.75
8.3.30.0070.01018.75
8.3.20.0050.00320.76
8.3.10.0000.00821.97
8.3.00.0060.00322.52
8.2.270.0070.01117.27
8.2.260.0040.01418.69
8.2.250.0090.00916.75
8.2.240.0070.01019.26
8.2.230.0040.00420.94
8.2.220.0060.00337.54
8.2.210.0030.00526.77
8.2.200.0070.00716.38
8.2.190.0130.00716.58
8.2.180.0070.01118.16
8.2.170.0100.00322.96
8.2.160.0030.01020.43
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00026.16
8.2.110.0090.00019.16
8.2.100.0040.00717.78
8.2.90.0040.00420.42
8.2.80.0080.00017.97
8.2.70.0040.00418.05
8.2.60.0050.00318.09
8.2.50.0040.00418.10
8.2.40.0040.00819.25
8.2.30.0040.00419.13
8.2.20.0040.00418.14
8.2.10.0040.00419.30
8.2.00.0050.00219.23
8.1.310.0050.00316.84
8.1.300.0150.00418.61
8.1.290.0040.00418.88
8.1.280.0130.00625.92
8.1.270.0040.00423.66
8.1.260.0000.00726.35
8.1.250.0050.00328.09
8.1.240.0100.00021.14
8.1.230.0070.00420.97
8.1.220.0080.00017.74
8.1.210.0100.00018.93
8.1.200.0000.00917.23
8.1.190.0060.00317.13
8.1.180.0000.00818.10
8.1.170.0000.00720.90
8.1.160.0070.00019.06
8.1.150.0000.00718.87
8.1.140.0030.00320.25
8.1.130.0000.00720.14
8.1.120.0040.00317.52
8.1.110.0050.00517.41
8.1.100.0000.00817.38
8.1.90.0000.00817.44
8.1.80.0050.00317.29
8.1.70.0000.00817.33
8.1.60.0080.00017.60
8.1.50.0060.00317.42
8.1.40.0080.00017.37
8.1.30.0040.00417.69
8.1.20.0040.00417.67
8.1.10.0000.00817.47
8.1.00.0080.00017.33
8.0.300.0080.00019.86
8.0.290.0000.00816.75
8.0.280.0040.00418.36
8.0.270.0030.00317.17
8.0.260.0030.00319.97
8.0.250.0000.00716.85
8.0.240.0040.00416.85
8.0.230.0070.00016.86
8.0.220.0030.00316.78
8.0.210.0070.00016.78
8.0.200.0000.00716.89
8.0.190.0050.00216.94
8.0.180.0080.00016.82
8.0.170.0030.00616.79
8.0.160.0030.00316.94
8.0.150.0000.00716.82
8.0.140.0070.00016.82
8.0.130.0030.00313.29
8.0.120.0040.00416.86
8.0.110.0000.00816.87
8.0.100.0040.00416.83
8.0.90.0030.00616.86
8.0.80.0060.01316.87
8.0.70.0040.00416.90
8.0.60.0000.00716.71
8.0.50.0050.00216.85
8.0.30.0090.00717.02
8.0.20.0150.00416.80
8.0.10.0040.00417.08
8.0.00.0120.00616.61
7.4.330.0020.00215.55
7.4.320.0000.00616.45
7.4.300.0030.00316.48
7.4.290.0050.00316.56
7.4.280.0040.00416.49
7.4.270.0000.00716.45
7.4.260.0080.00013.20
7.4.250.0030.00316.57
7.4.240.0040.00416.49
7.4.230.0030.00716.30
7.4.220.0030.00316.62
7.4.210.0110.00816.52
7.4.200.0030.00316.71
7.4.130.0100.00716.36
7.4.120.0070.01016.29
7.4.110.0090.01316.42
7.4.100.0060.01216.49
7.4.90.0110.00616.48
7.4.80.0100.00619.39
7.4.70.0140.00616.56
7.4.60.0060.01416.50
7.4.50.0060.00816.34
7.4.40.0080.00816.43
7.4.10.0060.01115.06
7.4.00.0070.00915.02
7.3.330.0000.00716.32
7.3.320.0030.00313.23
7.3.310.0030.00516.39
7.3.300.0040.00416.28
7.3.290.0000.00716.28
7.3.260.0120.00716.46
7.3.240.0070.01116.47
7.3.230.0130.00716.37
7.3.210.0100.00716.36
7.3.200.0130.00616.48
7.3.190.0000.01516.37
7.3.180.0070.01016.18
7.3.170.0060.01016.70
7.3.160.0090.00616.55
7.3.130.0100.00814.98
7.3.120.0080.01015.10
7.3.110.0130.00614.80
7.3.100.0080.00614.82
7.3.90.0070.00514.89
7.3.80.0060.00914.83
7.3.70.0050.00814.90
7.3.60.0120.00614.80
7.3.50.0040.01314.82
7.3.40.0070.00914.81
7.3.30.0090.00714.88
7.3.20.0080.00616.09
7.3.10.0050.00716.12
7.3.00.0070.00916.01
7.2.330.0060.01716.59
7.2.320.0150.00316.79
7.2.310.0090.00916.64
7.2.300.0070.01016.66
7.2.290.0060.01016.44
7.2.260.0070.01115.06
7.2.250.0040.01115.08
7.2.240.0120.00115.13
7.2.230.0040.01215.02
7.2.220.0070.00815.10
7.2.210.0060.00914.99
7.2.200.0100.00614.82
7.2.190.0070.00815.08
7.2.180.0070.00915.03
7.2.170.0070.01215.02
7.2.160.0120.00515.11
7.2.150.0060.00716.25
7.2.140.0080.00816.25
7.2.130.0100.00716.28
7.2.120.0090.00716.25
7.2.110.0080.00816.24
7.2.100.0050.01016.25
7.2.90.0090.00616.33
7.2.80.0060.00816.08
7.2.70.0060.01316.16
7.2.60.0060.01116.20
7.2.50.0100.00816.13
7.2.40.0070.00916.28
7.2.30.0090.00516.36
7.2.20.0070.00816.21
7.2.10.0070.00916.16
7.2.00.0090.00716.34
7.1.330.0000.01515.77
7.1.320.0060.00815.17
7.1.310.0060.00915.19
7.1.300.0080.00815.20
7.1.290.0020.01015.01
7.1.280.0020.01315.15
7.1.270.0050.00915.10
7.1.260.0040.01015.00
7.1.250.0110.00515.09
7.1.240.0050.00615.95
7.1.230.0070.00715.84
7.1.220.0010.01315.85
7.1.210.0030.00915.90
7.1.200.0100.00515.69
7.1.190.0080.00615.78
7.1.180.0110.00315.65
7.1.170.0040.00815.94
7.1.160.0090.00515.90
7.1.150.0040.00815.86
7.1.140.0070.00715.86
7.1.130.0050.01115.81
7.1.120.0070.00415.72
7.1.110.0090.00115.81
7.1.100.0040.00715.70
7.1.90.0020.01215.77
7.1.80.0040.01115.71
7.1.70.0070.00515.89
7.1.60.0050.00715.73
7.1.50.0070.00515.93
7.1.40.0080.00615.85
7.1.30.0070.00815.72
7.1.20.0080.00515.96
7.1.10.0080.00815.72
7.1.00.0030.01115.86

preferences:
31 ms | 403 KiB | 5 Q