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.40.0110.00318.77
8.3.30.0060.00918.80
8.3.20.0080.00020.20
8.3.10.0050.00323.43
8.3.00.0030.00619.36
8.2.170.0040.01122.96
8.2.160.0070.00720.40
8.2.150.0030.00724.18
8.2.140.0070.00024.66
8.2.130.0070.00317.63
8.2.120.0050.00326.35
8.2.110.0060.00320.52
8.2.100.0040.00817.80
8.2.90.0000.00719.23
8.2.80.0060.00317.97
8.2.70.0070.00317.50
8.2.60.0000.00917.93
8.2.50.0040.00418.07
8.2.40.0050.00319.32
8.2.30.0040.00420.64
8.2.20.0000.00817.75
8.2.10.0040.00417.96
8.2.00.0080.00017.93
8.1.270.0060.00623.95
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0030.00622.05
8.1.230.0040.00819.32
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0040.00417.10
8.1.180.0000.00718.10
8.1.170.0030.00518.57
8.1.160.0040.00421.96
8.1.150.0000.00718.85
8.1.140.0030.00519.39
8.1.130.0070.00017.61
8.1.120.0060.00317.34
8.1.110.0040.00417.37
8.1.100.0070.00017.36
8.1.90.0030.00317.41
8.1.80.0030.00417.41
8.1.70.0000.00717.34
8.1.60.0040.00417.59
8.1.50.0000.00917.54
8.1.40.0040.00417.54
8.1.30.0040.00417.52
8.1.20.0000.00817.66
8.1.10.0050.00317.57
8.1.00.0030.00617.45
8.0.300.0070.00018.77
8.0.290.0030.00316.75
8.0.280.0030.00318.27
8.0.270.0000.00717.16
8.0.260.0060.00017.08
8.0.250.0070.00017.04
8.0.240.0000.00716.95
8.0.230.0030.00616.88
8.0.220.0040.00416.96
8.0.210.0040.00416.76
8.0.200.0000.00616.96
8.0.190.0070.00016.85
8.0.180.0000.00816.98
8.0.170.0040.00416.99
8.0.160.0050.00216.95
8.0.150.0000.00716.75
8.0.140.0000.00716.89
8.0.130.0060.00013.37
8.0.120.0090.00016.83
8.0.110.0000.00816.74
8.0.100.0080.00016.71
8.0.90.0040.00316.84
8.0.80.0120.00316.95
8.0.70.0000.00816.94
8.0.60.0020.00516.80
8.0.50.0000.00916.93
8.0.30.0130.00716.92
8.0.20.0110.01217.41
8.0.10.0050.00316.82
8.0.00.0070.01216.77
7.4.330.0030.00315.08
7.4.320.0030.00316.59
7.4.300.0050.00316.47
7.4.290.0030.00316.43
7.4.280.0040.00416.55
7.4.270.0000.00716.64
7.4.260.0050.00216.41
7.4.250.0040.00416.46
7.4.240.0000.00716.64
7.4.230.0000.00716.63
7.4.220.0090.00916.63
7.4.210.0090.00616.63
7.4.200.0040.00416.68
7.4.160.0040.01216.31
7.4.150.0130.00717.40
7.4.140.0090.00917.86
7.4.130.0110.00616.59
7.4.120.0140.00316.57
7.4.110.0070.01116.52
7.4.100.0140.00316.39
7.4.90.0120.00616.48
7.4.80.0070.01419.39
7.4.70.0110.00716.58
7.4.60.0100.00716.72
7.4.50.0090.00416.21
7.4.40.0110.00716.53
7.4.30.0130.01016.71
7.4.10.0080.01015.21
7.4.00.0100.00614.94
7.3.330.0050.00013.09
7.3.320.0050.00013.27
7.3.310.0070.00016.21
7.3.300.0000.00716.31
7.3.290.0050.00916.30
7.3.280.0070.01116.28
7.3.270.0150.00317.40
7.3.260.0100.00916.49
7.3.250.0110.00716.39
7.3.240.0100.00716.41
7.3.230.0130.01016.47
7.3.210.0070.01016.63
7.3.200.0130.00316.21
7.3.190.0030.01316.59
7.3.180.0200.00016.64
7.3.170.0120.00916.39
7.3.160.0080.00816.48
7.3.130.0080.01015.01
7.3.120.0100.00714.89
7.3.110.0090.00914.88
7.3.100.0050.00914.84
7.3.90.0050.01314.78
7.3.80.0070.00514.74
7.3.70.0080.00514.76
7.3.60.0030.01014.67
7.3.50.0040.00614.60
7.3.40.0070.00414.67
7.3.30.0040.00914.88
7.3.20.0080.00516.74
7.3.10.0080.00516.64
7.3.00.0110.00316.71
7.2.330.0090.00916.73
7.2.320.0050.01416.68
7.2.310.0100.00716.70
7.2.300.0060.01316.61
7.2.290.0110.00716.55
7.2.260.0070.01115.15
7.2.250.0090.00614.87
7.2.240.0100.00514.89
7.2.230.0020.01415.03
7.2.220.0150.00114.96
7.2.210.0100.00315.08
7.2.200.0100.00414.96
7.2.190.0110.00314.91
7.2.180.0000.01414.91
7.2.170.0060.00815.08
7.2.160.0040.00714.94
7.2.150.0050.00916.85
7.2.140.0060.01016.92
7.2.130.0060.00516.89
7.2.120.0070.00716.79
7.2.110.0040.01116.87
7.2.100.0060.00816.98
7.2.90.0080.00316.79
7.2.80.0080.00716.70
7.2.70.0060.00916.85
7.2.60.0020.01216.91
7.2.50.0020.01017.00
7.2.40.0060.00716.73
7.2.30.0060.00616.97
7.2.20.0100.00516.93
7.2.10.0060.00616.96
7.2.00.0050.00817.81
7.1.330.0030.01215.77
7.1.320.0040.00715.73
7.1.310.0060.00415.77
7.1.300.0050.00815.66
7.1.290.0030.00815.65
7.1.280.0020.01215.70
7.1.270.0050.00515.69
7.1.260.0030.01015.64
7.1.250.0050.00615.66
7.1.240.0060.00415.77
7.1.230.0060.00615.64
7.1.220.0000.01015.73
7.1.210.0070.00615.67
7.1.200.0040.00815.71
7.1.190.0100.00515.69
7.1.180.0020.00715.78
7.1.170.0080.00315.83
7.1.160.0070.00515.76
7.1.150.0020.01315.71
7.1.140.0050.00815.71
7.1.130.0050.00915.81
7.1.120.0050.00815.75
7.1.110.0080.00815.60
7.1.100.0080.00616.49
7.1.90.0070.00915.79
7.1.80.0060.00615.58
7.1.70.0050.00616.28
7.1.60.0070.00916.95
7.1.50.0050.00816.24
7.1.40.0070.00715.77
7.1.30.0080.00915.68
7.1.20.0080.00715.72
7.1.10.0060.00615.76
7.1.00.0050.03117.77
7.0.330.0050.00615.39
7.0.320.0070.00615.35
7.0.310.0070.00515.22
7.0.300.0020.01015.38
7.0.290.0060.00715.35
7.0.280.0110.00215.25
7.0.270.0030.00915.42
7.0.260.0100.00615.38
7.0.250.0070.00515.28
7.0.240.0020.00815.30
7.0.230.0090.00715.30
7.0.220.0040.00615.24
7.0.210.0080.00515.33
7.0.200.0030.00815.87
7.0.190.0100.00615.18
7.0.180.0070.01015.25
7.0.170.0080.00515.19
7.0.160.0060.00415.41
7.0.150.0060.00815.40
7.0.140.0050.00815.11
7.0.130.0040.00915.31
7.0.120.0060.00415.45
7.0.110.0050.01015.48
7.0.100.0030.00715.36
7.0.90.0030.00915.41
7.0.80.0040.01215.44
7.0.70.0060.00915.31
7.0.60.0110.03316.80
7.0.50.0060.02116.27
7.0.40.0050.03615.65
7.0.30.0130.03415.68
7.0.20.0130.01915.78
7.0.10.0060.01815.73
7.0.00.0040.03115.63
5.6.400.0050.01214.30
5.6.390.0050.00814.29
5.6.380.0080.00514.22
5.6.370.0100.00514.23
5.6.360.0050.00614.52
5.6.350.0040.00714.32
5.6.340.0080.01014.14
5.6.330.0060.00714.09
5.6.320.0050.00914.39
5.6.310.0050.00714.25
5.6.300.0090.00514.13
5.6.290.0090.00714.16
5.6.280.0060.01316.46
5.6.270.0020.01014.12
5.6.260.0030.00814.12
5.6.250.0090.00614.21
5.6.240.0080.00614.28
5.6.230.0070.00914.35
5.6.220.0090.00314.30
5.6.210.0070.03216.52
5.6.200.0080.03315.66
5.6.190.0030.02316.32
5.6.180.0110.02116.38
5.6.170.0130.01716.15
5.6.160.0090.02616.36
5.6.150.0060.01715.60
5.6.140.0060.03015.63
5.6.130.0030.02015.56
5.6.120.0070.03116.40
5.6.110.0050.01816.43
5.6.100.0030.02016.34
5.6.90.0070.03316.53
5.6.80.0040.03116.24
5.6.70.0070.00814.14
5.6.60.0120.00314.11
5.6.50.0080.00814.24
5.6.40.0080.00414.24
5.6.30.0010.01014.13
5.6.20.0050.00914.12
5.6.10.0050.00714.01
5.6.00.0060.00614.15
5.5.380.0080.00914.21
5.5.370.0060.01014.00
5.5.360.0020.00814.01
5.5.350.0080.01716.27
5.5.340.0030.02415.48
5.5.330.0070.02016.30
5.5.320.0150.01616.26
5.5.310.0160.02616.28
5.5.300.0090.02815.37
5.5.290.0080.03115.44
5.5.280.0110.03116.36
5.5.270.0070.02916.35
5.5.260.0060.01716.40
5.5.250.0030.03616.21
5.5.240.0050.01416.12
5.5.230.0050.00713.92
5.5.220.0100.00614.18
5.5.210.0080.00714.15
5.5.200.0070.00614.10
5.5.190.0070.00814.13
5.5.180.0060.00714.06
5.5.170.0030.00714.01
5.5.160.0060.00614.16
5.5.150.0060.00614.26
5.5.140.0050.00914.22
5.5.130.0070.00714.20
5.5.120.0020.01213.84
5.5.110.0050.00814.07
5.5.100.0060.00614.06
5.5.90.0030.00713.96
5.5.80.0090.00313.91
5.5.70.0080.00214.02
5.5.60.0060.00313.87
5.5.50.0050.00813.94
5.5.40.0050.00614.04
5.5.30.0050.01013.76
5.5.20.0070.00513.97
5.5.10.0020.00814.00
5.5.00.0050.00414.16

preferences:
53.9 ms | 400 KiB | 5 Q