3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(Array('b','d'), Array('c','a'), Array('b','d'), Array('a','d'), Array('c'), Array('c'), Array('a','d','e'), Array('d','b') ); function array_count_values_of($value, $array) { $counts = array_count_values($array); return $counts[$value]; } for($i=0 ; $i<count($array) ; $i++) { $temp = array_count_values_of($array2[$i], $array); $result[$i][0] = $array2[$i]; $result[$i][1] = $temp; } print_r($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.3.60.0040.01118.30
8.3.50.0130.00821.09
8.3.40.0000.01618.80
8.3.30.0140.00019.23
8.3.20.0050.00320.29
8.3.10.0000.00821.92
8.3.00.0000.00822.51
8.2.180.0090.00616.88
8.2.170.0140.00722.96
8.2.160.0150.00019.12
8.2.150.0030.00624.18
8.2.140.0120.00324.66
8.2.130.0060.00326.16
8.2.120.0060.00319.36
8.2.110.0030.00622.02
8.2.100.0090.00317.99
8.2.90.0000.00819.28
8.2.80.0030.00618.05
8.2.70.0030.00617.63
8.2.60.0090.00017.93
8.2.50.0040.00418.07
8.2.40.0060.00320.07
8.2.30.0070.00018.20
8.2.20.0020.00517.90
8.2.10.0030.00617.75
8.2.00.0100.00017.84
8.1.280.0110.00625.92
8.1.270.0030.00622.06
8.1.260.0030.00526.35
8.1.250.0080.00028.09
8.1.240.0090.00023.83
8.1.230.0090.00319.10
8.1.220.0060.00317.79
8.1.210.0040.00418.77
8.1.200.0030.00717.36
8.1.190.0030.00617.63
8.1.180.0000.00818.87
8.1.170.0000.00818.49
8.1.160.0050.00222.19
8.1.150.0070.00018.71
8.1.140.0040.00417.46
8.1.130.0070.00017.84
8.1.120.0040.00417.51
8.1.110.0040.00417.45
8.1.100.0070.00017.44
8.1.90.0040.00417.43
8.1.80.0000.00717.46
8.1.70.0070.00017.42
8.1.60.0040.00417.65
8.1.50.0040.00417.55
8.1.40.0040.00417.49
8.1.30.0000.00817.53
8.1.20.0000.00917.65
8.1.10.0060.00317.48
8.1.00.0040.00417.41
8.0.300.0000.00718.77
8.0.290.0070.00017.05
8.0.280.0000.00718.44
8.0.270.0000.00717.14
8.0.260.0000.00616.79
8.0.250.0030.00316.92
8.0.240.0060.00316.98
8.0.230.0000.00717.02
8.0.220.0000.00716.92
8.0.210.0000.00716.89
8.0.200.0030.00616.97
8.0.190.0060.00316.96
8.0.180.0000.00716.95
8.0.170.0040.00417.04
8.0.160.0000.00816.93
8.0.150.0050.00216.90
8.0.140.0030.00516.99
8.0.130.0030.00313.43
8.0.120.0030.00616.91
8.0.110.0000.00716.89
8.0.100.0050.00316.99
8.0.90.0000.00717.09
8.0.80.0060.00916.93
8.0.70.0040.00416.89
8.0.60.0000.00816.84
8.0.50.0070.00016.91
8.0.30.0090.01017.09
8.0.20.0060.01217.40
8.0.10.0000.00717.16
8.0.00.0150.00416.75
7.4.330.0070.00015.00
7.4.320.0030.00316.63
7.4.300.0030.00316.63
7.4.290.0030.00316.54
7.4.280.0030.00316.59
7.4.270.0000.00816.60
7.4.260.0040.00416.47
7.4.250.0020.00516.48
7.4.240.0010.00616.57
7.4.230.0030.00316.50
7.4.220.0060.01216.46
7.4.210.0090.00816.62
7.4.200.0070.00016.64
7.4.190.0040.00416.74
7.4.160.0100.01016.41
7.4.150.0100.00817.40
7.4.140.0090.01317.86
7.4.130.0060.01216.55
7.4.120.0120.00716.57
7.4.110.0060.01216.66
7.4.100.0200.00016.49
7.4.90.0150.00916.55
7.4.80.0110.00719.39
7.4.70.0140.00316.29
7.4.60.0070.01116.54
7.4.50.0000.00816.49
7.4.40.0060.00622.77
7.4.30.0030.01316.57
7.4.00.0120.00315.05
7.3.330.0030.00313.21
7.3.320.0030.00313.23
7.3.310.0070.00016.33
7.3.300.0070.00016.32
7.3.290.0030.01016.39
7.3.280.0110.00516.46
7.3.270.0090.00917.40
7.3.260.0090.00916.62
7.3.250.0030.01516.32
7.3.240.0000.01816.44
7.3.230.0100.01016.52
7.3.210.0170.00716.42
7.3.200.0110.00719.39
7.3.190.0050.01416.34
7.3.180.0070.01116.38
7.3.170.0190.00316.42
7.3.160.0070.01016.44
7.3.120.0100.00614.87
7.3.10.0060.00616.70
7.3.00.0040.00416.46
7.2.330.0100.01616.80
7.2.320.0120.00616.71
7.2.310.0130.00316.55
7.2.300.0070.01016.69
7.2.290.0040.01516.69
7.2.130.0060.00916.83
7.2.120.0030.01016.69
7.2.110.0080.00416.72
7.2.100.0090.00316.76
7.2.90.0000.01416.70
7.2.80.0060.00916.63
7.2.70.0070.00417.08
7.2.60.0040.00917.04
7.2.50.0070.00716.96
7.2.40.0080.00416.82
7.2.30.0110.00416.56
7.2.20.0000.01116.82
7.2.10.0100.00616.89
7.2.00.0080.00518.20
7.1.250.0030.00716.00
7.1.100.0040.00418.20
7.1.70.0000.01117.04
7.1.60.0030.01319.82
7.1.50.0100.01316.93
7.1.00.0070.03322.40
7.0.200.0040.00416.57
7.0.140.0030.07722.23
7.0.60.0000.04319.96
7.0.50.0270.06017.96
7.0.40.0130.04720.18
7.0.30.0370.07720.23
7.0.20.0300.06020.07
7.0.10.0300.06020.25
7.0.00.0000.05020.31
5.6.280.0070.07320.93
5.6.210.0030.08020.51
5.6.200.0000.04318.19
5.6.190.0030.08320.39
5.6.180.3330.04020.64
5.6.170.0400.07020.39
5.6.160.0100.03720.39
5.6.150.0100.08018.25
5.6.140.0030.04018.17
5.6.130.0030.04018.15
5.6.120.0130.07321.12
5.6.110.0130.08721.01
5.6.100.0130.07021.01
5.6.90.0070.08321.00
5.6.80.0230.06320.40
5.6.70.0300.05320.51
5.5.350.0070.08720.41
5.5.340.0100.04018.05
5.5.330.0000.09020.41
5.5.320.0200.04320.51
5.5.310.0200.05320.34
5.5.300.0030.04317.98
5.5.290.0070.04017.92
5.5.280.0130.08020.87
5.5.270.0070.04020.77
5.5.260.0400.06020.89
5.5.250.0170.08020.70
5.5.240.0070.08020.27
5.4.450.0170.07019.71
5.4.440.0900.05019.61
5.4.430.0930.05319.61
5.4.420.0770.05719.48
5.4.410.1000.06319.26
5.4.400.0430.04718.62
5.4.390.0230.07318.59
5.4.380.0330.04718.63
5.4.370.0200.05018.75
5.4.360.0230.04718.78
5.4.350.0130.05718.53
5.4.340.0230.07318.75
5.4.320.0080.04512.51
5.4.310.0070.04812.50
5.4.300.0080.03912.50
5.4.290.0080.04212.50
5.4.280.0040.05212.40
5.4.270.0090.03812.40
5.4.260.0100.06019.00
5.4.250.0170.04318.81
5.4.240.0200.06019.03
5.4.230.0030.08018.80
5.4.220.0130.05718.94
5.4.210.0070.05718.81
5.4.200.0030.05719.02
5.4.190.0000.06318.66
5.4.180.0030.06018.79
5.4.170.0130.04718.66
5.4.160.0070.05718.82
5.4.150.0070.06018.82
5.4.140.0100.04716.56
5.4.130.0030.06016.42
5.4.120.0070.05016.50
5.4.110.0130.06716.41
5.4.100.0030.07016.47
5.4.90.0070.04716.64
5.4.80.0030.05316.33
5.4.70.0130.04316.42
5.4.60.0100.04316.47
5.4.50.0230.05316.32
5.4.40.0070.05716.54
5.4.30.0170.06016.49
5.4.20.0100.04716.35
5.4.10.0070.06316.38
5.4.00.0030.05715.83
5.3.290.0080.04112.80
5.3.280.0170.06314.58
5.3.270.0070.05714.69
5.3.260.0070.05314.75
5.3.250.0070.06314.67
5.3.240.0030.05314.65
5.3.230.0070.05314.59
5.3.220.0030.07014.48
5.3.210.0130.06714.58
5.3.200.0070.05014.66
5.3.190.0100.05314.75
5.3.180.0100.04714.40
5.3.170.0100.04714.47
5.3.160.0070.06314.75
5.3.150.0070.05014.70
5.3.140.0130.06014.54
5.3.130.0070.05714.52
5.3.120.0170.04314.55
5.3.110.0200.05314.54
5.3.100.0100.07314.13
5.3.90.0100.06714.20
5.3.80.0130.06714.20
5.3.70.0070.06714.12
5.3.60.0100.07014.18
5.3.50.0130.04014.02
5.3.40.0000.05313.78
5.3.30.0070.05314.09
5.3.20.0030.05013.68
5.3.10.0170.04013.66
5.3.00.0100.04713.71
5.2.170.0030.05711.36
5.2.160.0070.05311.13
5.2.150.0070.04311.32
5.2.140.0130.03311.36
5.2.130.0100.03311.07
5.2.120.0100.03711.19
5.2.110.0100.05311.17
5.2.100.0070.03711.09
5.2.90.0000.04710.93
5.2.80.0130.04011.18
5.2.70.0100.04311.31
5.2.60.0030.04711.05
5.2.50.0070.04010.98
5.2.40.0030.04311.09
5.2.30.0070.04311.05
5.2.20.0030.04010.95
5.2.10.0030.04310.82
5.2.00.0070.04010.91
5.1.60.0000.04010.04
5.1.50.0030.03710.20
5.1.40.0030.03310.07
5.1.30.0070.04010.32
5.1.20.0170.02710.44
5.1.10.0000.04010.27
5.1.00.0070.03710.16
5.0.50.0030.0438.71
5.0.40.0130.0338.46
5.0.30.0030.0538.30
5.0.20.0100.0338.40
5.0.10.0070.0238.24
5.0.00.0000.0478.28
4.4.90.0000.0237.48
4.4.80.0030.0207.48
4.4.70.0070.0177.48
4.4.60.0030.0237.48
4.4.50.0070.0207.48
4.4.40.0030.0337.48
4.4.30.0000.0307.48
4.4.20.0030.0307.48
4.4.10.0070.0207.48
4.4.00.0070.0407.48
4.3.110.0100.0277.48
4.3.100.0100.0237.48
4.3.90.0000.0237.48
4.3.80.0000.0377.48
4.3.70.0000.0237.48
4.3.60.0000.0307.48
4.3.50.0100.0237.48
4.3.40.0030.0377.48
4.3.30.0000.0307.48
4.3.20.0030.0207.48
4.3.10.0000.0337.48
4.3.00.0130.0236.89

preferences:
51 ms | 404 KiB | 6 Q