3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(array $array) { try { return isDictionary($array); } catch (Exception $e) { echo 'ss'; return 'error'; } } function isDictionary($array) { foreach($array as $key => $value) { return ! is_int($key); } return false; } $arr = 0; var_dump(test(['0' => '', '1' => 'a', '2' => '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.3.60.0120.00316.38
8.3.50.0160.00921.93
8.3.40.0060.01218.80
8.3.30.0060.00918.71
8.3.20.0060.00320.33
8.3.10.0040.00423.48
8.3.00.0080.00019.38
8.2.180.0090.00616.75
8.2.170.0170.00322.96
8.2.160.0100.00320.34
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0050.00517.49
8.2.120.0000.00826.35
8.2.110.0040.00721.04
8.2.100.0060.00617.78
8.2.90.0000.00818.03
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0000.00918.04
8.2.50.0050.00318.07
8.2.40.0040.00419.09
8.2.30.0040.00420.55
8.2.20.0040.00417.72
8.2.10.0040.00418.23
8.2.00.0000.00818.04
8.1.280.0100.01025.92
8.1.270.0040.00423.91
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0030.00722.52
8.1.230.0070.00321.04
8.1.220.0080.00017.76
8.1.210.0040.00419.11
8.1.200.0000.00917.22
8.1.190.0000.00817.23
8.1.180.0000.00918.10
8.1.170.0040.00418.56
8.1.160.0000.00721.97
8.1.150.0000.00818.94
8.1.140.0040.00419.59
8.1.130.0030.00317.57
8.1.120.0070.00017.38
8.1.110.0030.00517.43
8.1.100.0070.00017.42
8.1.90.0000.00717.37
8.1.80.0040.00417.44
8.1.70.0000.00717.39
8.1.60.0040.00817.59
8.1.50.0030.00617.51
8.1.40.0090.00017.38
8.1.30.0040.00417.69
8.1.20.0000.00717.64
8.1.10.0040.00417.38
8.1.00.0060.00317.35
8.0.300.0070.00019.84
8.0.290.0000.00716.58
8.0.280.0030.00318.32
8.0.270.0080.00017.26
8.0.260.0030.00317.13
8.0.250.0070.00017.01
8.0.240.0060.00016.98
8.0.230.0030.00316.86
8.0.220.0030.00716.81
8.0.210.0040.00416.92
8.0.200.0000.00716.97
8.0.190.0030.00317.02
8.0.180.0040.00416.88
8.0.170.0070.00316.94
8.0.160.0020.00516.86
8.0.150.0000.00816.86
8.0.140.0030.00316.87
8.0.130.0000.00513.31
8.0.120.0030.00516.79
8.0.110.0040.00416.90
8.0.100.0000.00716.83
8.0.90.0040.00416.93
8.0.80.0070.00716.96
8.0.70.0000.00716.77
8.0.60.0000.00716.89
8.0.50.0040.00416.95
8.0.30.0060.01117.21
8.0.20.0090.01117.40
8.0.10.0030.00516.87
8.0.00.0080.00916.79
7.4.330.0060.00016.82
7.4.320.0040.00416.61
7.4.300.0030.00316.44
7.4.290.0000.00716.59
7.4.280.0050.00216.60
7.4.270.0040.00416.52
7.4.260.0000.00716.39
7.4.250.0000.00716.54
7.4.240.0020.00616.50
7.4.230.0040.00416.63
7.4.220.0110.00716.55
7.4.210.0130.00616.56
7.4.200.0000.00716.65
7.4.160.0130.00616.52
7.4.150.0130.00317.40
7.4.140.0100.01317.86
7.4.130.0070.01016.50
7.4.120.0030.01416.57
7.4.110.0060.01216.45
7.4.100.0110.00716.67
7.4.90.0070.01016.47
7.4.80.0120.01019.39
7.4.70.0030.01516.58
7.4.60.0120.00316.46
7.4.50.0000.01416.58
7.4.40.0110.01116.46
7.4.30.0110.00716.69
7.4.00.0130.00315.01
7.3.330.0060.00013.25
7.3.320.0040.00313.24
7.3.310.0040.00416.15
7.3.300.0070.00016.21
7.3.290.0090.00516.27
7.3.280.0090.00816.30
7.3.270.0120.01217.40
7.3.260.0080.00816.36
7.3.250.0090.00916.50
7.3.240.0120.00716.30
7.3.230.0160.00816.46
7.3.210.0100.00716.61
7.3.200.0130.01016.69
7.3.190.0060.01316.44
7.3.180.0100.01016.59
7.3.170.0110.00516.51
7.3.160.0120.00416.58
7.2.330.0140.00416.36
7.2.320.0170.00316.69
7.2.310.0040.01316.72
7.2.300.0100.00716.51
7.2.290.0090.00916.77
7.2.00.0030.00919.28
7.1.100.0060.00918.39
7.1.70.0040.00417.14
7.1.60.0140.01019.36
7.1.50.0030.01716.71
7.1.00.0070.07022.51
7.0.200.0000.00716.70
7.0.60.0070.07719.99
7.0.50.0030.08017.85
7.0.40.0170.07720.20
7.0.30.0400.05720.08
7.0.20.0270.05720.19
7.0.10.0100.04720.06
7.0.00.0070.08320.09
5.6.280.0130.06021.03
5.6.210.0100.08320.51
5.6.200.0030.06718.24
5.6.190.0170.07320.52
5.6.180.0430.03720.39
5.6.170.0230.08020.51
5.6.160.0130.07320.43
5.6.150.0070.08018.17
5.6.140.0000.05018.15
5.6.130.0070.05018.15
5.6.120.0070.06720.90
5.6.110.0070.06020.99
5.6.100.0070.05720.98
5.6.90.0170.08020.97
5.6.80.0100.03320.54
5.5.350.4230.04320.50
5.5.340.0070.04318.06
5.5.330.0030.08320.26
5.5.320.0000.05720.34
5.5.310.0230.05020.27
5.5.300.0030.08317.98
5.5.290.0030.05317.95
5.5.280.0100.08020.97
5.5.270.0000.04320.90
5.5.260.0170.07020.87
5.5.250.0070.03720.47
5.5.240.0370.02720.16

preferences:
43.38 ms | 401 KiB | 5 Q