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 = 0; 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.0100.01016.75
8.3.50.0080.01222.03
8.3.40.0070.00718.88
8.3.30.0110.00418.67
8.3.20.0040.00419.98
8.3.10.0000.00823.66
8.3.00.0080.00019.38
8.2.180.0110.01116.50
8.2.170.0060.00822.96
8.2.160.0110.00420.52
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0060.00317.50
8.2.120.0070.00026.35
8.2.110.0100.00020.35
8.2.100.0130.00017.91
8.2.90.0040.00418.04
8.2.80.0030.00517.97
8.2.70.0030.00517.68
8.2.60.0040.00417.79
8.2.50.0090.00018.10
8.2.40.0040.00420.45
8.2.30.0030.00320.63
8.2.20.0030.00617.60
8.2.10.0030.00517.95
8.2.00.0000.00818.08
8.1.280.0140.00725.92
8.1.270.0080.00023.83
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0030.00623.92
8.1.230.0060.00619.10
8.1.220.0050.00317.75
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.11
8.1.180.0000.00818.10
8.1.170.0030.00618.59
8.1.160.0040.00421.89
8.1.150.0050.00318.86
8.1.140.0000.00819.53
8.1.130.0000.00717.54
8.1.120.0030.00617.46
8.1.110.0000.00817.42
8.1.100.0040.00417.36
8.1.90.0000.00717.34
8.1.80.0040.00417.37
8.1.70.0040.00417.36
8.1.60.0000.00717.55
8.1.50.0000.00817.57
8.1.40.0000.00817.48
8.1.30.0000.00817.69
8.1.20.0000.00717.58
8.1.10.0060.00317.48
8.1.00.0000.00717.36
8.0.300.0070.00019.54
8.0.290.0070.00316.88
8.0.280.0030.00318.34
8.0.270.0040.00417.18
8.0.260.0030.00317.23
8.0.250.0080.00016.96
8.0.240.0000.00616.79
8.0.230.0030.00716.88
8.0.220.0040.00416.88
8.0.210.0030.00316.90
8.0.200.0060.00016.82
8.0.190.0070.00016.85
8.0.180.0040.00416.80
8.0.170.0050.00216.89
8.0.160.0000.00716.92
8.0.150.0030.00316.77
8.0.140.0000.00916.77
8.0.130.0000.00513.27
8.0.120.0040.00416.79
8.0.110.0050.00316.91
8.0.100.0000.00716.72
8.0.90.0040.00416.84
8.0.80.0070.00716.91
8.0.70.0000.00816.73
8.0.60.0000.00816.93
8.0.50.0000.00716.92
8.0.30.0150.00717.09
8.0.20.0090.01117.40
8.0.10.0040.00416.97
8.0.00.0080.01116.62
7.4.330.0050.00315.08
7.4.320.0000.00616.49
7.4.300.0030.00516.54
7.4.290.0030.00316.44
7.4.280.0000.00716.58
7.4.270.0040.00416.38
7.4.260.0000.00716.48
7.4.250.0040.00416.36
7.4.240.0050.00216.54
7.4.230.0060.00016.69
7.4.220.0130.00716.52
7.4.210.0040.01016.69
7.4.200.0030.00316.70
7.4.160.0120.00416.43
7.4.150.0110.00817.40
7.4.140.0140.01417.86
7.4.130.0060.01316.56
7.4.120.0080.00816.47
7.4.110.0140.00716.46
7.4.100.0090.00916.51
7.4.90.0090.00916.37
7.4.80.0110.01119.39
7.4.70.0100.00716.43
7.4.60.0060.00916.64
7.4.50.0060.00616.54
7.4.40.0120.00616.64
7.4.30.0110.00616.47
7.4.00.0040.01215.12
7.3.330.0000.00513.13
7.3.320.0050.00013.33
7.3.310.0040.00416.47
7.3.300.0000.00616.20
7.3.290.0080.00616.25
7.3.280.0080.01116.30
7.3.270.0200.00017.40
7.3.260.0140.00416.37
7.3.250.0090.00816.38
7.3.240.0120.00816.43
7.3.230.0140.00316.56
7.3.210.0170.00716.64
7.3.200.0130.00316.30
7.3.190.0070.01016.30
7.3.180.0100.00616.18
7.3.170.0030.01316.46
7.3.160.0120.00316.46
7.3.10.0090.00616.21
7.3.00.0140.01116.10
7.2.330.0150.00416.66
7.2.320.0070.01116.75
7.2.310.0040.01416.73
7.2.300.0140.00316.63
7.2.290.0090.01216.62
7.2.130.0100.01016.44
7.2.120.0070.01316.65
7.2.110.0130.00915.97
7.2.100.0170.00516.39
7.2.90.0120.00816.38
7.2.80.0140.00716.29
7.2.70.0120.00016.41
7.2.60.0150.00816.54
7.2.50.0160.01416.48
7.2.40.0100.01016.77
7.2.30.0100.01416.72
7.2.20.0110.01416.47
7.2.10.0150.00816.03
7.2.00.0090.00717.99
7.1.250.0070.01015.59
7.1.200.0090.00315.91
7.1.100.0070.00417.89
7.1.70.0020.00517.19
7.1.60.0070.01519.36
7.1.50.0190.00316.90
7.1.00.0030.07722.35
7.0.200.0060.00316.41
7.0.60.0000.04319.92
7.0.50.0030.08717.88
7.0.40.0130.05320.40
7.0.30.0430.05320.11
7.0.20.0300.07320.09
7.0.10.0030.09320.16
7.0.00.0070.05020.16
5.6.280.0030.03021.07
5.6.210.0030.05320.47
5.6.200.0070.05318.16
5.6.190.0100.08020.47
5.6.180.3670.04320.52
5.6.170.0230.08020.40
5.6.160.0070.08320.54
5.6.150.0100.03318.25
5.6.140.0030.03718.24
5.6.130.0070.08018.23
5.6.120.0000.04721.03
5.6.110.0070.08721.05
5.6.100.0130.05320.96
5.6.90.0100.07721.11
5.6.80.0100.05720.49
5.5.350.3970.04020.34
5.5.340.0070.08018.04
5.5.330.0000.04320.27
5.5.320.0070.09020.44
5.5.310.0130.04720.31
5.5.300.0030.08717.95
5.5.290.0030.04017.95
5.5.280.0030.04020.78
5.5.270.0100.08020.86
5.5.260.0200.07020.87
5.5.250.0200.07320.78
5.5.240.0270.06720.01

preferences:
60.12 ms | 401 KiB | 5 Q