3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 0 => "556878", 1 => "12345", 2 => "12345", 3 => "234567", 4 => "45673", 5 => "45673", ]; $n = 2; $result = array_keys(array_intersect(array_count_values($arr), [$n])); var_dump($result);

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.4.130.0100.01017.74
8.4.120.0050.00424.13
8.4.110.0110.00922.46
8.4.100.0180.00417.75
8.4.90.0120.00818.43
8.4.80.0130.00618.64
8.4.70.0030.00517.59
8.4.60.0110.00618.75
8.4.50.0030.00617.93
8.4.40.0040.01419.37
8.4.30.0060.01320.23
8.4.20.0120.00920.80
8.4.10.0030.00619.38
8.3.260.0110.00816.44
8.3.250.0120.00718.89
8.3.240.0070.00717.22
8.3.230.0100.00816.34
8.3.220.0100.00718.90
8.3.210.0110.00816.74
8.3.200.0160.00416.32
8.3.190.0110.00816.51
8.3.180.0130.00516.55
8.3.170.0200.00017.18
8.3.160.0100.01016.39
8.3.150.0130.00616.98
8.3.140.0090.00917.03
8.3.130.0100.00016.59
8.3.120.0000.00920.68
8.3.110.0030.00620.94
8.3.100.0060.00324.06
8.3.90.0040.00426.77
8.3.80.0040.00816.38
8.3.70.0120.00316.58
8.3.60.0110.00718.56
8.3.50.0120.00518.38
8.3.40.0140.00018.46
8.3.30.0070.00718.60
8.3.20.0030.00622.57
8.3.10.0030.00519.10
8.3.00.0060.00321.90
8.2.290.0120.00720.30
8.2.280.0080.00818.24
8.2.270.0150.00417.26
8.2.260.0040.00418.64
8.2.250.0090.00616.59
8.2.240.0070.00416.95
8.2.230.0040.00422.58
8.2.220.0000.00937.54
8.2.210.0060.00326.77
8.2.200.0090.00016.62
8.2.190.0030.01116.58
8.2.180.0070.00725.92
8.2.170.0150.00022.96
8.2.160.0140.00420.24
8.2.150.0030.00624.18
8.2.140.0070.00024.66
8.2.130.0030.00626.16
8.2.120.0080.00020.97
8.2.110.0100.00022.21
8.2.100.0030.00917.79
8.2.90.0030.00517.75
8.2.80.0080.00017.97
8.2.70.0000.00817.79
8.2.60.0020.00518.16
8.2.50.0040.00418.10
8.2.40.0040.00419.30
8.2.30.0000.00819.20
8.2.20.0040.00417.93
8.2.10.0000.00718.93
8.2.00.0000.00719.56
8.1.330.0080.00922.07
8.1.320.0080.01116.25
8.1.310.0080.00016.69
8.1.300.0090.00918.54
8.1.290.0090.00030.84
8.1.280.0120.00625.92
8.1.270.0050.00322.08
8.1.260.0060.00326.35
8.1.250.0100.00328.09
8.1.240.0030.00622.09
8.1.230.0110.00018.93
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0110.00317.00
8.1.190.0090.00017.35
8.1.180.0040.00418.10
8.1.170.0030.00518.59
8.1.160.0040.00418.93
8.1.150.0040.00418.87
8.1.140.0040.00420.71
8.1.130.0030.00317.41
8.1.120.0000.00717.48
8.1.110.0040.00417.41
8.1.100.0040.00417.30
8.1.90.0000.00717.43
8.1.80.0060.00317.46
8.1.70.0040.00417.46
8.1.60.0060.00617.43
8.1.50.0040.00417.35
8.1.40.0090.00017.45
8.1.30.0000.00817.58
8.1.20.0080.00017.60
8.1.10.0000.00717.50
8.1.00.0070.00017.36
8.0.300.0000.00819.65
8.0.290.0070.00016.75
8.0.280.0000.00718.36
8.0.270.0030.00317.13
8.0.260.0000.00716.82
8.0.250.0030.00316.89
8.0.240.0000.00716.95
8.0.230.0030.00316.84
8.0.220.0030.00316.91
8.0.210.0000.00716.79
8.0.200.0040.00416.96
8.0.190.0040.00416.96
8.0.180.0000.00716.80
8.0.170.0040.00416.89
8.0.160.0000.00716.78
8.0.150.0000.00716.88
8.0.140.0040.00416.88
8.0.130.0030.00313.30
8.0.120.0040.00416.73
8.0.110.0020.00516.82
8.0.100.0040.00416.86
8.0.90.0040.00316.86
8.0.80.0030.01116.84
8.0.70.0040.00416.84
8.0.60.0020.00516.89
8.0.50.0000.00716.86
8.0.30.0060.01017.21
8.0.20.0130.00616.76
8.0.10.0000.00817.07
8.0.00.0100.01216.75
7.4.330.0020.00215.55
7.4.320.0030.00316.49
7.4.300.0030.00316.63
7.4.290.0030.00316.52
7.4.280.0000.00716.39
7.4.270.0070.00016.41
7.4.260.0040.00416.59
7.4.250.0000.00716.46
7.4.240.0000.00816.53
7.4.230.0000.00716.66
7.4.220.0050.00316.50
7.4.210.0110.00716.60
7.4.200.0040.00416.68
7.4.160.0110.00616.55
7.4.130.0130.00316.40
7.4.120.0070.01016.56
7.4.110.0120.00516.53
7.4.100.0100.00716.21
7.4.90.0100.01016.36
7.4.80.0090.00819.39
7.4.70.0160.00616.48
7.4.60.0090.00816.48
7.4.50.0060.00616.56
7.4.40.0030.01316.49
7.4.00.0090.00614.82
7.3.330.0000.00512.93
7.3.320.0030.00313.04
7.3.310.0060.00016.29
7.3.300.0000.00716.21
7.3.290.0070.00016.22
7.3.280.0050.01216.09
7.3.260.0090.00816.29
7.3.240.0100.00716.30
7.3.230.0190.00016.30
7.3.210.0060.01416.09
7.3.200.0120.01216.27
7.3.190.0120.00916.45
7.3.180.0120.00316.33
7.3.170.0140.00716.18
7.3.160.0000.01716.38
7.3.50.0080.00814.62
7.3.40.0110.00814.75
7.3.30.0040.00714.67
7.3.20.0100.00316.55
7.3.10.0070.00916.36
7.3.00.0080.00816.48
7.2.330.0000.01716.64
7.2.320.0130.00316.46
7.2.310.0060.00916.43
7.2.300.0080.00916.49
7.2.290.0070.01016.71
7.2.180.0130.00715.00
7.2.170.0110.01114.95
7.2.160.0050.00614.70
7.2.150.0130.00816.77
7.2.140.0090.00416.59
7.2.130.0040.00816.70
7.2.120.0070.00916.78
7.2.110.0060.00616.65
7.2.100.0060.00416.96
7.2.90.0100.00616.80
7.2.80.0110.00716.98
7.2.70.0060.00716.74
7.2.60.0100.00716.75
7.2.50.0070.00916.88
7.2.40.0060.01216.73
7.2.30.0080.00516.91
7.2.20.0120.01016.82
7.2.10.0050.00916.76
7.2.00.0090.00516.95
7.1.280.0060.01015.81
7.1.270.0100.00815.75
7.1.260.0060.00915.78
7.1.250.0090.00615.73

preferences:
27.82 ms | 403 KiB | 5 Q