3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array (0, 1, 1, 2, 0.5, 0.5); $counts = array_count_values(array_map('strval', $array)); $mode = array_search(max($counts), $counts); echo $mode; echo PHP_EOL; var_dump(isBiModal($counts)); function isBiModal($counts) { $match = max($counts); $filtered = array_filter($counts, function($el) use($match) { return $el === $match; }); return count($filtered) > 1; }

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.0210.00018.07
8.3.50.0100.00716.39
8.3.40.0060.01218.71
8.3.30.0090.00618.73
8.3.20.0040.00419.39
8.3.10.0040.00423.51
8.3.00.0030.00620.50
8.2.180.0140.00716.63
8.2.170.0140.00018.96
8.2.160.0090.00921.01
8.2.150.0120.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0070.00021.00
8.2.110.0050.00520.94
8.2.100.0000.01217.84
8.2.90.0000.00718.30
8.2.80.0000.00817.97
8.2.70.0040.00418.04
8.2.60.0000.00718.09
8.2.50.0030.00618.10
8.2.40.0030.00619.46
8.2.30.0080.00020.65
8.2.20.0050.00218.18
8.2.10.0070.00018.38
8.2.00.0000.00819.39
8.1.280.0070.00725.92
8.1.270.0050.00324.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00817.27
8.1.230.0120.00020.97
8.1.220.0000.00817.79
8.1.210.0030.00618.82
8.1.200.0000.00917.47
8.1.190.0030.00517.24
8.1.180.0040.00418.10
8.1.170.0050.00318.64
8.1.160.0040.00418.91
8.1.150.0040.00418.89
8.1.140.0030.00618.93
8.1.130.0000.00819.03
8.1.120.0040.00417.50
8.1.110.0000.00817.45
8.1.100.0050.00217.45
8.1.90.0080.00017.35
8.1.80.0000.00717.50
8.1.70.0050.00217.35
8.1.60.0000.00817.63
8.1.50.0000.00817.56
8.1.40.0040.00417.57
8.1.30.0040.00417.59
8.1.20.0050.00317.60
8.1.10.0030.00517.49
8.1.00.0030.00517.45
8.0.300.0040.00419.69
8.0.290.0030.00616.75
8.0.280.0030.00318.45
8.0.270.0080.00016.81
8.0.260.0030.00318.51
8.0.250.0050.00316.87
8.0.240.0030.00316.96
8.0.230.0040.00416.91
8.0.220.0050.00316.78
8.0.210.0000.00816.89
8.0.200.0030.00616.95
8.0.190.0030.00616.84
8.0.180.0030.00616.93
8.0.170.0060.00316.90
8.0.160.0050.00216.82
8.0.150.0030.00516.83
8.0.140.0030.00316.88
8.0.130.0030.00313.27
8.0.120.0070.00016.80
8.0.110.0000.00816.88
8.0.100.0070.00016.88
8.0.90.0050.00216.88
8.0.80.0080.01016.88
8.0.70.0040.00416.78
8.0.60.0070.00016.86
8.0.50.0040.00416.80
8.0.30.0130.00617.07
8.0.20.0070.01117.40
8.0.10.0000.00717.05
8.0.00.0150.00316.63
7.4.330.0000.00515.55
7.4.320.0000.00616.57
7.4.300.0070.00016.59
7.4.290.0030.00616.64
7.4.280.0080.00016.63
7.4.270.0040.00416.63
7.4.260.0030.00316.62
7.4.250.0050.00216.44
7.4.240.0070.00016.36
7.4.230.0000.00716.43
7.4.220.0090.00016.67
7.4.210.0030.01016.62
7.4.200.0000.00716.48
7.4.160.0080.01016.42
7.4.140.0120.00817.86
7.4.130.0060.01016.58
7.4.120.0140.00716.52
7.4.110.0130.00316.54
7.4.100.0100.00716.36
7.4.90.0060.01216.56
7.4.80.0120.01019.39
7.4.70.0130.00316.38
7.4.60.0070.01016.71
7.4.50.0070.00316.59
7.4.40.0090.01716.63
7.4.10.0100.01016.19
7.4.00.0050.01115.63
7.3.330.0000.00513.28
7.3.320.0030.00313.30
7.3.310.0000.00716.22
7.3.300.0040.00416.36
7.3.290.0000.00716.40
7.3.280.0070.00716.26
7.3.260.0120.00816.48
7.3.240.0050.01316.28
7.3.230.0090.00916.47
7.3.210.0130.00316.46
7.3.200.0060.01216.42
7.3.190.0100.00616.32
7.3.180.0060.01016.35
7.3.170.0060.01016.62
7.3.160.0060.00916.38
7.3.130.0100.01016.50
7.3.120.0090.00616.46
7.3.110.0100.01016.52
7.3.100.0110.00716.25
7.3.90.0040.00816.42
7.3.80.0070.00716.25
7.3.70.0060.00916.43
7.3.60.0060.01016.31
7.3.50.0030.00716.45
7.3.40.0030.00916.44
7.3.30.0030.01016.32
7.3.20.0060.00618.09
7.3.10.0100.00318.21
7.3.00.0000.01018.16
7.2.330.0160.00516.66
7.2.320.0150.00616.64
7.2.310.0070.01016.64
7.2.300.0030.01316.71
7.2.290.0110.00816.77
7.2.260.0100.01016.50
7.2.250.0070.01316.53
7.2.240.0090.00616.83
7.2.230.0040.01516.65
7.2.220.0150.00016.46
7.2.210.0090.00616.60
7.2.200.0050.00516.56
7.2.190.0060.00916.51
7.2.180.0060.00616.53
7.2.170.0080.00416.57
7.2.160.0040.01116.64
7.2.150.0070.00718.46
7.2.140.0000.01118.40
7.2.130.0080.00418.39
7.2.120.0060.00618.41
7.2.110.0080.01118.54
7.2.100.0000.01118.51
7.2.90.1530.00816.57
7.2.80.1120.01116.58
7.2.70.0350.01216.44
7.2.60.0120.00716.57
7.2.50.2610.01016.73
7.2.40.1590.00916.71
7.2.30.0140.00316.64
7.2.20.0730.01216.60
7.2.10.1800.00516.70
7.2.00.1140.01316.76
7.1.330.0060.00617.23
7.1.320.0080.00317.43
7.1.310.0060.00917.29
7.1.300.0040.01117.39
7.1.290.0070.00317.33
7.1.280.0040.00717.21
7.1.270.0000.01017.41
7.1.260.0090.00617.26
7.1.250.0050.00517.28
7.1.240.0070.00717.21
7.1.230.0090.00017.28
7.1.220.0030.00717.41
7.1.210.0580.00815.54
7.1.200.1150.01115.71
7.1.190.1050.00315.49
7.1.180.1690.00515.63
7.1.170.2130.00915.65
7.1.160.0950.00815.70
7.1.150.0060.01115.60
7.1.140.0480.00515.46
7.1.130.0100.00615.68
7.1.120.1420.00615.54
7.1.110.0930.00515.53
7.1.100.0350.00315.52
7.1.90.2680.00915.62
7.1.80.1100.00615.65
7.1.70.2600.00215.59
7.1.60.1910.01224.51
7.1.50.2070.00724.55
7.1.40.2800.01124.64
7.1.30.0320.00824.68
7.1.20.1770.00924.75
7.1.10.1510.00515.58
7.1.00.0360.00215.56
7.0.330.0040.00417.04
7.0.320.0030.01017.05
7.0.310.0040.00816.89
7.0.300.0110.00417.00
7.0.290.0070.00717.12
7.0.280.0100.00717.16
7.0.270.0040.01117.13
7.0.260.0100.00316.93
7.0.250.0060.00616.99
7.0.240.0040.01117.00
7.0.230.0070.00417.30
7.0.220.0130.00016.84
7.0.210.0030.01016.95
7.0.200.0030.01016.99
7.0.190.0060.00617.05
7.0.180.0060.00617.19
7.0.170.0060.00617.16
7.0.160.0050.00517.02
7.0.150.0000.01017.00
7.0.140.0030.00617.09
7.0.130.0060.00616.87
7.0.120.0100.00717.07
7.0.110.0030.01317.07
7.0.100.0130.00017.05
7.0.90.0060.00316.78
7.0.80.0090.00317.07
7.0.70.0070.00717.06
7.0.60.0030.01017.06
7.0.50.0100.00716.91
7.0.40.0090.00614.95
7.0.30.0050.00415.13
7.0.20.0040.00815.05
7.0.10.0030.01215.11
7.0.00.0030.01014.90
5.6.400.0090.00915.98
5.6.390.0000.01416.11
5.6.380.0040.00815.92
5.6.370.0030.01315.60
5.6.360.0040.01115.93
5.6.350.0070.01116.10
5.6.340.0060.00615.58
5.6.330.0040.00815.99
5.6.320.0080.00816.21
5.6.310.0120.00315.95
5.6.300.0000.01516.02
5.6.290.0120.00015.94
5.6.280.0040.00816.01
5.6.270.0040.01116.06
5.6.260.0100.00315.95
5.6.250.0030.01215.94
5.6.240.0040.01115.94
5.6.230.0060.00915.80
5.6.220.0070.00715.79
5.6.210.0000.01015.68
5.6.200.0100.00715.86
5.6.190.0070.01015.86
5.6.180.0070.00715.84
5.6.170.0000.01716.18
5.6.160.0030.01015.71
5.6.150.0030.01015.70
5.6.140.0030.00615.83
5.6.130.0100.00715.86
5.6.120.0030.01315.86
5.6.110.0030.01015.88
5.6.100.0070.00715.86
5.6.90.0090.00915.96
5.6.80.0000.01615.98
5.6.70.0030.01015.93
5.6.60.0110.00015.79
5.6.50.0080.00415.86
5.6.40.0030.01015.82
5.6.30.0070.01115.67
5.6.20.0080.00815.80
5.6.10.0000.01815.81
5.6.00.0110.00415.65

preferences:
59.84 ms | 400 KiB | 5 Q