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($array[$i], $array); $result[$i][0] = $array[$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.0070.00718.55
8.3.50.0090.00921.15
8.3.40.0090.00618.84
8.3.30.0040.01119.07
8.3.20.0040.00420.19
8.3.10.0000.00722.07
8.3.00.0080.00022.52
8.2.180.0000.01425.92
8.2.170.0070.00722.96
8.2.160.0070.00719.08
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0090.00026.16
8.2.120.0040.00419.23
8.2.110.0030.00620.39
8.2.100.0030.00917.91
8.2.90.0040.00419.18
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0030.00618.05
8.2.50.0050.00318.07
8.2.40.0040.00419.75
8.2.30.0040.00418.04
8.2.20.0070.00017.72
8.2.10.0000.00717.88
8.2.00.0060.00317.80
8.1.280.0110.00425.92
8.1.270.0040.00422.07
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00322.72
8.1.230.0080.00420.31
8.1.220.0050.00217.76
8.1.210.0030.00518.77
8.1.200.0060.00317.23
8.1.190.0030.00617.52
8.1.180.0040.00418.70
8.1.170.0050.00318.64
8.1.160.0070.00022.16
8.1.150.0000.00718.70
8.1.140.0000.00717.37
8.1.130.0000.00717.85
8.1.120.0030.00317.52
8.1.110.0040.00417.50
8.1.100.0070.00017.45
8.1.90.0060.00317.43
8.1.80.0040.00417.49
8.1.70.0000.00717.36
8.1.60.0000.00817.52
8.1.50.0040.00417.53
8.1.40.0040.00417.45
8.1.30.0000.00917.50
8.1.20.0000.00717.66
8.1.10.0030.00517.58
8.1.00.0000.00817.54
8.0.300.0000.00718.77
8.0.290.0070.00017.16
8.0.280.0000.00818.30
8.0.270.0000.00817.12
8.0.260.0030.00316.74
8.0.250.0030.00316.95
8.0.240.0000.01016.90
8.0.230.0000.00717.00
8.0.220.0030.00316.88
8.0.210.0000.00716.80
8.0.200.0000.00716.79
8.0.190.0000.00816.82
8.0.180.0000.00716.88
8.0.170.0000.00816.93
8.0.160.0040.00416.87
8.0.150.0040.00417.04
8.0.140.0000.00816.92
8.0.130.0030.00313.32
8.0.120.0040.00416.81
8.0.110.0080.00016.93
8.0.100.0080.00016.82
8.0.90.0000.00716.97
8.0.80.0140.00616.91
8.0.70.0000.00716.96
8.0.60.0050.00216.83
8.0.50.0040.00416.96
8.0.30.0160.00517.21
8.0.20.0080.01117.40
8.0.10.0040.00416.92
8.0.00.0070.01116.69
7.4.330.0040.00415.00
7.4.320.0000.00716.49
7.4.300.0060.00016.53
7.4.290.0040.00416.48
7.4.280.0000.00716.55
7.4.270.0070.00016.66
7.4.260.0000.00716.39
7.4.250.0040.00416.58
7.4.240.0040.00316.52
7.4.230.0030.00316.52
7.4.220.0140.00616.60
7.4.210.0070.00816.59
7.4.200.0070.00016.61
7.4.190.0040.00416.68
7.4.160.0130.00316.85
7.4.150.0110.00717.40
7.4.140.0070.01317.86
7.4.130.0110.00916.42
7.4.120.0090.00916.54
7.4.110.0130.00616.45
7.4.100.0070.01416.61
7.4.90.0030.01416.65
7.4.80.0100.01019.39
7.4.70.0090.00916.31
7.4.60.0040.01716.62
7.4.50.0060.00316.72
7.4.40.0090.00622.77
7.4.30.0130.00516.67
7.4.00.0110.00314.98
7.3.330.0050.00013.41
7.3.320.0030.00313.44
7.3.310.0000.00716.25
7.3.300.0030.00316.49
7.3.290.0040.01016.45
7.3.280.0060.00916.42
7.3.270.0090.00917.40
7.3.260.0070.01516.51
7.3.250.0110.00616.46
7.3.240.0000.01816.55
7.3.230.0060.01116.39
7.3.210.0070.01016.34
7.3.200.0130.00719.39
7.3.190.0110.01116.41
7.3.180.0100.00716.59
7.3.170.0120.00616.48
7.3.160.0080.00816.67
7.3.120.0040.01114.52
7.3.10.0040.01216.46
7.3.00.0040.01116.60
7.2.330.0130.00616.76
7.2.320.0030.02016.61
7.2.310.0070.01016.59
7.2.300.0000.01816.79
7.2.290.0080.00816.52
7.2.130.0070.00316.87
7.2.120.0060.00916.71
7.2.110.0060.01017.10
7.2.100.0130.00317.02
7.2.90.0040.01116.85
7.2.80.0060.00916.87
7.2.70.0040.01116.86
7.2.60.0090.00516.92
7.2.50.0090.00617.00
7.2.40.0040.00716.70
7.2.30.0060.00916.91
7.2.20.0060.00916.80
7.2.10.0030.00716.79
7.2.00.0090.00616.64
7.1.250.0080.00615.54
7.1.200.0060.00615.94
7.1.100.0030.00917.86
7.1.70.0020.00517.14
7.1.60.0110.01119.82
7.1.50.0100.01416.98
7.1.00.0000.05322.42
7.0.200.0030.00716.57
7.0.140.0070.06322.04
7.0.60.0170.05019.97
7.0.50.0130.03717.89
7.0.40.0100.04720.19
7.0.30.0230.04720.17
7.0.20.0130.04020.30
7.0.10.0130.09020.24
7.0.00.0070.05320.05
5.6.280.0030.07721.02
5.6.210.0070.08020.52
5.6.200.0100.08718.29
5.6.190.0000.08320.64
5.6.180.0230.08020.45
5.6.170.0270.04020.49
5.6.160.0000.09320.39
5.6.150.0070.08318.28
5.6.140.0100.04718.18
5.6.130.0070.05318.15
5.6.120.0030.04321.05
5.6.110.0100.08721.00
5.6.100.0070.05721.02
5.6.90.0070.04021.13
5.6.80.0030.09020.39
5.5.350.0000.05720.50
5.5.340.0100.07718.00
5.5.330.0100.08320.27
5.5.320.0300.06320.30
5.5.310.0270.07720.34
5.5.300.0100.05017.95
5.5.290.0070.08718.02
5.5.280.0070.08320.98
5.5.270.0000.04320.87
5.5.260.0230.07020.77
5.5.250.0200.06320.80
5.5.240.0300.06320.12
5.4.450.0270.04319.39
5.4.440.0470.04719.39
5.4.430.0700.04019.16
5.4.420.0730.03319.34
5.4.410.1330.03319.26
5.4.400.0830.03719.25
5.4.390.0500.04319.06
5.4.380.0170.05318.64
5.4.370.0270.04318.74
5.4.360.0130.06018.68
5.4.350.0230.05018.54
5.4.340.0170.05318.52
5.4.320.0050.05712.50
5.4.310.0120.04712.50
5.4.300.0100.03812.51
5.4.290.0140.04112.50
5.4.280.0080.03712.40
5.4.270.0090.04512.40
5.4.260.0070.05018.99
5.4.250.0200.04319.02
5.4.240.0070.05718.97
5.4.230.0070.07318.95
5.4.220.0100.05318.66
5.4.210.0200.04719.03
5.4.200.0070.08318.80
5.4.190.0100.05718.83
5.4.180.0130.07318.74
5.4.170.0230.06019.02
5.4.160.0100.06019.08
5.4.150.0100.06318.89
5.4.140.0230.06016.39
5.4.130.0070.06316.30
5.4.120.0170.06716.57
5.4.110.0030.05716.38
5.4.100.0070.05316.39
5.4.90.0130.06716.50
5.4.80.0070.05316.48
5.4.70.0100.05716.54
5.4.60.0130.05316.31
5.4.50.0170.04016.48
5.4.40.0130.04316.44
5.4.30.0070.05316.33
5.4.20.0100.05716.64
5.4.10.0100.05716.35
5.4.00.0100.04716.03
5.3.290.0060.04312.80
5.3.280.0170.04314.76
5.3.270.0200.05314.67
5.3.260.0100.05314.52
5.3.250.0230.04714.75
5.3.240.0070.06714.64
5.3.230.0130.06014.69
5.3.220.0130.04714.62
5.3.210.0130.05714.66
5.3.200.0100.05014.66
5.3.190.0200.04714.54
5.3.180.0100.05014.79
5.3.170.0130.05714.65
5.3.160.0070.05314.49
5.3.150.0070.05314.65
5.3.140.0170.04314.46
5.3.130.0100.05714.64
5.3.120.0170.04714.54
5.3.110.0100.06014.64
5.3.100.0130.05014.21
5.3.90.0130.04713.99
5.3.80.0100.04714.04
5.3.70.0130.04714.01
5.3.60.0130.04713.98
5.3.50.0000.06013.93
5.3.40.0030.05313.93
5.3.30.0100.04713.90
5.3.20.0070.05313.68
5.3.10.0070.04713.48
5.3.00.0100.05313.73
5.2.170.0170.03711.13
5.2.160.0170.03311.30
5.2.150.0130.03711.37
5.2.140.0100.04711.36
5.2.130.0070.03710.93
5.2.120.0100.04011.28
5.2.110.0100.04011.17
5.2.100.0130.05711.18
5.2.90.0100.04011.18
5.2.80.0030.04310.93
5.2.70.0070.04311.08
5.2.60.0200.05311.22
5.2.50.0130.03711.01
5.2.40.0030.04711.08
5.2.30.0070.04310.97
5.2.20.0070.04011.18
5.2.10.0170.04010.93
5.2.00.0100.03710.63
5.1.60.0200.02310.05
5.1.50.0070.0339.96
5.1.40.0070.0339.94
5.1.30.0070.04310.32
5.1.20.0070.03710.31
5.1.10.0130.03710.02
5.1.00.0070.0509.90
5.0.50.0030.0338.64
5.0.40.0030.0308.51
5.0.30.0070.0408.07
5.0.20.0000.0338.45
5.0.10.0070.0308.14
5.0.00.0070.0408.22
4.4.90.0070.0337.48
4.4.80.0030.0207.48
4.4.70.0000.0277.48
4.4.60.0030.0237.48
4.4.50.0030.0307.48
4.4.40.0100.0437.48
4.4.30.0070.0207.48
4.4.20.0070.0207.48
4.4.10.0070.0207.48
4.4.00.0130.0377.48
4.3.110.0030.0237.48
4.3.100.0070.0177.48
4.3.90.0070.0277.48
4.3.80.0000.0477.48
4.3.70.0100.0137.48
4.3.60.0000.0237.48
4.3.50.0130.0137.48
4.3.40.0070.0307.48
4.3.30.0130.0137.48
4.3.20.0000.0237.48
4.3.10.0030.0207.48
4.3.00.0200.01313.16

preferences:
42.4 ms | 401 KiB | 5 Q