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 $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.60.0090.00916.63
8.3.50.0110.00417.92
8.3.40.0120.00318.70
8.3.30.0070.01118.81
8.3.20.0040.00420.20
8.3.10.0080.00023.40
8.3.00.0080.00019.38
8.2.180.0070.00716.75
8.2.170.0170.00322.96
8.2.160.0030.01320.53
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00417.49
8.2.120.0040.00426.35
8.2.110.0000.00920.44
8.2.100.0130.00017.68
8.2.90.0080.00019.17
8.2.80.0080.00017.97
8.2.70.0000.01017.63
8.2.60.0030.00517.93
8.2.50.0000.00918.07
8.2.40.0040.00419.32
8.2.30.0000.00820.63
8.2.20.0000.00817.67
8.2.10.0040.00418.06
8.2.00.0040.00417.98
8.1.280.0130.00925.92
8.1.270.0130.00324.00
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0000.01022.47
8.1.230.0110.00019.42
8.1.220.0080.00317.74
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0030.00617.10
8.1.180.0040.00418.10
8.1.170.0000.00818.78
8.1.160.0000.00721.96
8.1.150.0040.00418.84
8.1.140.0050.00319.43
8.1.130.0000.00717.69
8.1.120.0040.00417.31
8.1.110.0070.00017.38
8.1.100.0040.00417.44
8.1.90.0050.00217.30
8.1.80.0070.00017.41
8.1.70.0000.00717.29
8.1.60.0040.00417.59
8.1.50.0040.00417.54
8.1.40.0030.00517.48
8.1.30.0040.00417.50
8.1.20.0000.00817.70
8.1.10.0000.00817.63
8.1.00.0070.00317.53
8.0.300.0070.00018.77
8.0.290.0000.00816.63
8.0.280.0030.00318.50
8.0.270.0040.00417.12
8.0.260.0030.00317.08
8.0.250.0000.00716.93
8.0.240.0030.00316.98
8.0.230.0060.00316.95
8.0.220.0080.00016.93
8.0.210.0040.00416.91
8.0.200.0060.00016.94
8.0.190.0000.00816.96
8.0.180.0030.00316.86
8.0.170.0040.00416.92
8.0.160.0040.00316.97
8.0.150.0030.00316.95
8.0.140.0030.00416.77
8.0.130.0030.00313.27
8.0.120.0000.00816.96
8.0.110.0070.00016.74
8.0.100.0040.00416.96
8.0.90.0000.00716.73
8.0.80.0030.01316.86
8.0.70.0000.00716.87
8.0.60.0040.00416.77
8.0.50.0030.00516.78
8.0.30.0130.00617.09
8.0.20.0100.00817.40
8.0.10.0040.00416.86
8.0.00.0110.00716.69
7.4.330.0000.00716.77
7.4.320.0000.00616.39
7.4.300.0000.00816.42
7.4.290.0030.00316.50
7.4.280.0040.00416.41
7.4.270.0070.00016.47
7.4.260.0030.00316.40
7.4.250.0000.00716.58
7.4.240.0000.00716.57
7.4.230.0000.00716.60
7.4.220.0090.00916.56
7.4.210.0140.00016.38
7.4.200.0030.00316.40
7.4.160.0090.00616.66
7.4.150.0120.00617.40
7.4.140.0160.00717.86
7.4.130.0130.00716.55
7.4.120.0070.01016.53
7.4.110.0130.00716.60
7.4.100.0090.00916.43
7.4.90.0040.01516.58
7.4.80.0030.01619.39
7.4.70.0130.00316.62
7.4.60.0060.01016.48
7.4.50.0090.00616.48
7.4.40.0060.01116.39
7.4.30.0160.00616.62
7.4.00.0070.00715.14
7.3.330.0030.00313.36
7.3.320.0030.00313.33
7.3.310.0000.00716.26
7.3.300.0000.00716.17
7.3.290.0080.00916.29
7.3.280.0100.00716.28
7.3.270.0110.00617.40
7.3.260.0090.00916.31
7.3.250.0100.01016.39
7.3.240.0130.00316.40
7.3.230.0100.00616.54
7.3.210.0030.01316.38
7.3.200.0090.01016.39
7.3.190.0030.01316.38
7.3.180.0090.00616.30
7.3.170.0100.00716.37
7.3.160.0080.00816.44
7.2.330.0110.00716.64
7.2.320.0060.01216.36
7.2.310.0050.01316.48
7.2.300.0040.01316.46
7.2.290.0090.00916.73
7.2.60.0030.01316.58
7.2.00.0030.01019.22
7.1.200.0090.00615.69
7.1.100.0090.00317.67
7.1.70.0030.00517.22
7.1.60.0030.02119.36
7.1.50.0070.01416.72
7.1.00.0030.07722.33
7.0.200.0060.00316.64
7.0.60.0030.08019.93
7.0.50.0100.08017.90
7.0.40.0100.08320.23
7.0.30.0330.04320.19
7.0.20.0200.04720.09
7.0.10.0030.05720.20
7.0.00.0000.04720.09
5.6.280.0030.03020.99
5.6.210.0070.08320.75
5.6.200.0070.08318.22
5.6.190.0070.07320.34
5.6.180.3670.04020.50
5.6.170.0270.07720.40
5.6.160.0130.07020.55
5.6.150.0100.08018.23
5.6.140.0070.04318.28
5.6.130.0070.06318.16
5.6.120.0170.06721.01
5.6.110.0070.08321.11
5.6.100.0100.03321.02
5.6.90.0030.06021.00
5.6.80.0170.06720.41
5.5.350.4130.03720.45
5.5.340.0130.07317.97
5.5.330.0230.05320.21
5.5.320.0100.08320.36
5.5.310.0300.06320.34
5.5.300.0000.04318.02
5.5.290.0030.04018.09
5.5.280.0070.07020.88
5.5.270.0030.09720.87
5.5.260.0130.07720.79
5.5.250.0070.07320.61
5.5.240.0200.05320.16

preferences:
35.33 ms | 400 KiB | 5 Q