3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 0 => "556878", 1 => "12345", 2 => "12345", 3 => "234567", 4 => "45673", 5 => "45673" ); function getNtimes($array,$count){ $finalArray = []; $repeatedValuesCountArray = array_count_values($array); foreach($repeatedValuesCountArray as $key=>$value){ if($value == $count){ $finalArray[] = $key; } } return $finalArray; } print_r(getNtimes($array,2));

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.0140.00817.76
8.4.120.0110.01022.45
8.4.110.0120.00818.52
8.4.100.0100.01117.78
8.4.90.0090.00918.73
8.4.80.0090.01119.34
8.4.70.0120.00818.00
8.4.60.0130.00718.76
8.4.50.0130.00718.61
8.4.40.0060.01319.29
8.4.30.0130.00620.42
8.4.20.0100.01020.73
8.4.10.0000.00819.45
8.3.260.0140.00516.57
8.3.250.0070.00718.73
8.3.240.0080.01116.56
8.3.230.0130.00316.61
8.3.220.0120.00617.14
8.3.210.0070.00116.78
8.3.200.0030.00516.46
8.3.190.0040.00517.10
8.3.180.0100.00819.16
8.3.170.0090.00916.57
8.3.160.0120.00617.24
8.3.150.0110.00719.14
8.3.140.0060.00318.40
8.3.130.0030.00618.41
8.3.120.0080.00020.81
8.3.110.0050.00520.94
8.3.100.0090.00016.76
8.3.90.0000.01926.77
8.3.80.0060.00316.63
8.3.70.0130.01016.75
8.3.60.0110.01118.22
8.3.50.0140.00218.51
8.3.40.0080.00818.57
8.3.30.0080.00618.58
8.3.20.0100.00021.95
8.3.10.0040.00418.94
8.3.00.0040.00421.92
8.2.290.0110.00816.70
8.2.280.0110.00716.78
8.2.270.0110.00718.45
8.2.260.0120.00616.60
8.2.250.0080.00016.58
8.2.240.0080.00017.27
8.2.230.0130.00722.58
8.2.220.0040.00416.50
8.2.210.0110.00426.77
8.2.200.0100.00016.25
8.2.190.0090.00616.60
8.2.180.0070.00725.92
8.2.170.0100.00322.96
8.2.160.0040.01120.57
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00426.16
8.2.110.0180.00021.12
8.2.100.0040.00717.91
8.2.90.0000.00720.67
8.2.80.0000.00917.97
8.2.70.0050.00317.90
8.2.60.0000.00818.34
8.2.50.0040.00418.10
8.2.40.0040.00419.48
8.2.30.0040.00419.38
8.2.20.0000.00718.17
8.2.10.0040.00419.04
8.2.00.0000.00719.37
8.1.330.0080.01416.05
8.1.320.0050.00315.86
8.1.310.0150.00415.91
8.1.300.0060.00316.25
8.1.290.0100.00018.88
8.1.280.0110.01125.92
8.1.270.0040.00422.19
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00621.24
8.1.230.0060.00620.85
8.1.220.0000.00717.74
8.1.210.0050.00318.91
8.1.200.0090.00017.23
8.1.190.0050.00317.10
8.1.180.0060.00318.10
8.1.170.0040.00418.52
8.1.160.0000.00918.80
8.1.150.0000.00818.86
8.1.140.0030.00518.79
8.1.130.0000.00820.02
8.1.120.0000.00717.48
8.1.110.0000.00717.30
8.1.100.0040.00417.48
8.1.90.0060.00317.47
8.1.80.0050.00317.34
8.1.70.0040.00417.37
8.1.60.0040.00417.47
8.1.50.0040.00717.51
8.1.40.0040.00417.51
8.1.30.0030.00517.65
8.1.20.0030.00517.67
8.1.10.0050.00317.34
8.1.00.0060.00317.40
8.0.300.0000.00719.98
8.0.290.0040.00416.75
8.0.280.0070.00018.49
8.0.270.0000.00717.21
8.0.260.0000.00720.23
8.0.250.0040.00416.83
8.0.240.0030.00616.93
8.0.230.0040.00316.83
8.0.220.0000.00716.86
8.0.210.0030.00616.94
8.0.200.0000.00716.95
8.0.190.0000.00716.97
8.0.180.0050.00216.89
8.0.170.0040.00416.92
8.0.160.0040.00416.93
8.0.150.0000.00716.92
8.0.140.0040.00416.86
8.0.130.0050.00213.27
8.0.120.0060.00316.79
8.0.110.0040.00416.85
8.0.100.0080.00016.75
8.0.90.0070.00016.77
8.0.80.0190.00316.84
8.0.70.0070.00016.74
8.0.60.0000.00716.90
8.0.50.0000.00716.77
8.0.30.0150.00317.02
8.0.20.0140.00717.00
8.0.10.0000.00816.90
8.0.00.0110.00716.65
7.4.330.0050.00015.55
7.4.320.0030.00316.61
7.4.300.0030.00316.50
7.4.290.0070.00016.51
7.4.280.0000.00716.52
7.4.270.0050.00516.59
7.4.260.0070.00016.47
7.4.250.0030.00316.61
7.4.240.0040.00716.65
7.4.230.0030.00316.32
7.4.220.0000.00816.34
7.4.210.0140.00416.63
7.4.200.0070.00016.36
7.4.160.0080.01016.46
7.4.130.0120.01216.57
7.4.120.0090.01016.36
7.4.110.0240.00016.54
7.4.100.0060.00916.47
7.4.90.0130.00316.68
7.4.80.0130.01019.39
7.4.70.0040.01416.62
7.4.60.0050.01116.57
7.4.50.0040.01516.23
7.4.40.0090.00616.27
7.4.00.0030.00715.11
7.3.330.0060.00013.25
7.3.320.0000.00513.16
7.3.310.0050.00216.29
7.3.300.0070.00016.21
7.3.290.0000.00716.34
7.3.280.0160.00816.27
7.3.260.0080.00916.42
7.3.240.0100.00816.58
7.3.230.0150.00616.50
7.3.210.0070.01116.61
7.3.200.0150.00316.43
7.3.190.0100.01016.38
7.3.180.0070.01416.31
7.3.170.0070.00816.52
7.3.160.0080.00816.65
7.3.50.0030.01114.74
7.3.40.0120.00014.87
7.3.30.0060.01114.80
7.3.20.0100.01316.70
7.3.10.0070.01016.54
7.3.00.0140.00016.49
7.2.330.0060.01216.44
7.2.320.0100.01016.47
7.2.310.0050.01116.74
7.2.300.0130.00316.45
7.2.290.0120.00616.51
7.2.180.0100.00514.93
7.2.170.0080.00714.86
7.2.160.0060.00814.76
7.2.150.0110.00716.81
7.2.140.0090.00616.95
7.2.130.0030.01016.91
7.2.120.0090.00516.92
7.2.110.0080.00616.98
7.2.100.0080.00616.77
7.2.90.0190.00316.84
7.2.80.0080.00716.96
7.2.70.0040.01116.86
7.2.60.0100.00716.79
7.2.50.0170.00616.87
7.2.40.0070.01116.96
7.2.30.0100.00316.89
7.2.20.0040.01116.91
7.2.10.0070.00716.86
7.2.00.0110.00416.73
7.1.280.0050.00915.66
7.1.270.0070.00715.88
7.1.260.0080.00815.64
7.1.250.0070.01415.86

preferences:
34.82 ms | 403 KiB | 5 Q