3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($array) { try { return isDictionary($array); } catch (Exception $e) { echo $e->getMessage(); return 'error'; } } function isDictionary($array) { return !(bool)count(array_filter(array_keys($array), 'is_string')); } $arr = null; var_dump(test($arr));

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.0090.00916.50
8.3.60.0130.00916.50
8.3.50.0070.01321.99
8.3.40.0170.00318.83
8.3.30.0040.01118.46
8.3.20.0040.00420.38
8.3.10.0080.00023.66
8.3.00.0040.00419.38
8.2.180.0090.01216.63
8.2.170.0140.00722.96
8.2.160.0140.00020.41
8.2.150.0000.01124.18
8.2.140.0040.00424.66
8.2.130.0090.00017.63
8.2.120.0000.00726.35
8.2.110.0070.00321.12
8.2.100.0000.01117.91
8.2.90.0040.00419.95
8.2.80.0050.00317.97
8.2.70.0060.00317.80
8.2.60.0090.00017.91
8.2.50.0080.00318.10
8.2.40.0000.00720.57
8.2.30.0070.00020.59
8.2.20.0050.00517.68
8.2.10.0040.00417.95
8.2.00.0060.00318.10
8.1.280.0140.00725.92
8.1.270.0030.00623.86
8.1.260.0030.00528.09
8.1.250.0080.00028.09
8.1.240.0070.00319.09
8.1.230.0120.00020.79
8.1.220.0000.00917.79
8.1.210.0000.00918.77
8.1.200.0100.00017.35
8.1.190.0080.00017.23
8.1.180.0080.00018.10
8.1.170.0070.00318.46
8.1.160.0040.00421.95
8.1.150.0050.00318.82
8.1.140.0040.00419.47
8.1.130.0000.00717.63
8.1.120.0000.00817.38
8.1.110.0000.00717.33
8.1.100.0040.00417.38
8.1.90.0040.00417.36
8.1.80.0000.00817.35
8.1.70.0030.00317.42
8.1.60.0040.00417.58
8.1.50.0040.00417.45
8.1.40.0050.00317.58
8.1.30.0000.00817.56
8.1.20.0040.00417.64
8.1.10.0000.00817.57
8.1.00.0000.00817.47
8.0.300.0070.00020.03
8.0.290.0060.00316.75
8.0.280.0030.00318.32
8.0.270.0040.00417.19
8.0.260.0030.00317.19
8.0.250.0070.00016.94
8.0.240.0000.00617.00
8.0.230.0030.00616.94
8.0.220.0030.00616.75
8.0.210.0000.00716.87
8.0.200.0060.00016.99
8.0.190.0000.00816.98
8.0.180.0050.00216.80
8.0.170.0040.00416.93
8.0.160.0040.00416.86
8.0.150.0000.00716.71
8.0.140.0040.00416.90
8.0.130.0040.00413.30
8.0.120.0060.00316.74
8.0.110.0000.00716.79
8.0.100.0000.00716.80
8.0.90.0000.00716.88
8.0.80.0060.00916.95
8.0.70.0000.00716.73
8.0.60.0040.00416.86
8.0.50.0040.00416.95
8.0.30.0070.01117.09
8.0.20.0090.01017.40
8.0.10.0040.00417.01
8.0.00.0100.00916.78
7.4.330.0070.00015.08
7.4.320.0030.00316.43
7.4.300.0030.00316.41
7.4.290.0000.00716.40
7.4.280.0070.00016.48
7.4.270.0040.00416.48
7.4.260.0040.00416.61
7.4.250.0000.00716.36
7.4.240.0000.00816.58
7.4.230.0030.00316.60
7.4.220.0130.00716.52
7.4.210.0060.00816.62
7.4.200.0000.00716.62
7.4.160.0110.00516.43
7.4.150.0090.00917.40
7.4.140.0110.00817.86
7.4.130.0070.01116.53
7.4.120.0160.00416.49
7.4.110.0070.01116.57
7.4.100.0090.01216.45
7.4.90.0130.01316.51
7.4.80.0190.00319.39
7.4.70.0070.01116.68
7.4.60.0100.00716.66
7.4.50.0040.01116.54
7.4.40.0130.00416.43
7.4.30.0060.01616.43
7.4.00.0000.01514.86
7.3.330.0020.00213.31
7.3.320.0050.00013.26
7.3.310.0000.00716.36
7.3.300.0030.00316.30
7.3.290.0060.01116.32
7.3.280.0070.01116.25
7.3.270.0100.00717.40
7.3.260.0060.01116.64
7.3.250.0090.00816.47
7.3.240.0070.01516.52
7.3.230.0070.01016.39
7.3.210.0080.00816.34
7.3.200.0060.01016.61
7.3.190.0060.00916.44
7.3.180.0060.01216.29
7.3.170.0040.01316.57
7.3.160.0140.00316.33
7.2.330.0200.00316.76
7.2.320.0090.00916.50
7.2.310.0050.01416.71
7.2.300.0030.01416.64
7.2.290.0110.00716.51
7.2.60.0040.01116.98
7.2.00.0000.01319.53
7.1.200.0120.00015.62
7.1.100.0070.00317.80
7.1.70.0000.00817.13
7.1.60.0100.01419.36
7.1.50.0070.01717.05
7.1.00.0070.07022.33
7.0.200.0000.00916.74
7.0.60.0070.03719.98
7.0.50.0000.08017.93
7.0.40.0130.04020.40
7.0.30.0430.06320.19
7.0.20.0230.09020.24
7.0.10.0000.05320.17
7.0.00.0000.04320.10
5.6.210.0100.05020.60
5.6.200.0000.04718.29
5.6.190.0030.04320.33
5.6.180.4200.04020.48
5.6.170.0230.06720.62
5.6.160.0000.09020.50
5.6.150.0070.03318.21
5.6.140.0070.03718.14
5.6.130.0070.07718.14
5.6.120.0200.05021.02
5.6.110.0130.07020.87
5.6.100.0070.05321.00
5.6.90.0100.07320.97
5.6.80.0070.06320.49
5.5.350.4330.04020.39
5.5.340.0030.05717.96
5.5.330.0070.04020.21
5.5.320.0030.04320.34
5.5.310.0200.08020.28
5.5.300.0100.07717.95
5.5.290.0000.04317.95
5.5.280.0070.03720.96
5.5.270.0030.05320.89
5.5.260.0070.09320.74
5.5.250.0000.05720.80
5.5.240.0230.05020.24

preferences:
48.03 ms | 401 KiB | 5 Q