3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string1 = "abacadeee"; $string2 = "aabbccddee"; $counts2 = count_chars($string2, 1); $tally = 0; foreach (array_intersect_key(count_chars($string1, 1), $counts2) as $charcode1 => $count1) { $tally += min($counts2[$charcode1], $count1); ///echo $charcode1 , ": " , min($counts2[$charcode1], $count1) , "\n"; } echo $tally;

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.140.0120.00817.62
8.4.130.0130.00718.63
8.4.120.0110.00724.01
8.4.110.0110.00817.79
8.4.100.0130.00718.51
8.4.90.0040.00622.19
8.4.80.0090.00817.75
8.4.70.0140.00617.72
8.4.60.0140.00618.71
8.4.50.0080.01118.81
8.4.40.0040.00419.40
8.4.30.0100.01022.48
8.4.20.0070.01318.50
8.4.10.0090.00019.66
8.3.270.0130.00716.64
8.3.260.0120.00716.58
8.3.250.0100.00919.14
8.3.240.0090.00617.23
8.3.230.0130.00616.70
8.3.220.0050.00217.32
8.3.210.0060.00216.52
8.3.200.0060.00216.60
8.3.190.0060.00217.35
8.3.180.0060.00416.48
8.3.170.0070.01116.79
8.3.160.0050.00316.86
8.3.150.0090.00917.31
8.3.140.0080.00016.51
8.3.130.0080.00018.52
8.3.120.0000.01919.15
8.3.110.0060.00320.94
8.3.100.0030.00616.46
8.3.90.0100.00726.77
8.3.80.0060.00618.43
8.3.70.0110.00718.31
8.3.60.0140.00018.68
8.3.50.0110.00416.56
8.3.40.0040.01118.89
8.3.30.0140.00018.89
8.3.20.0080.00020.71
8.3.10.0040.00423.45
8.3.00.0050.00322.41
8.2.290.0100.00820.21
8.2.280.0090.00820.05
8.2.270.0110.00716.73
8.2.260.0120.00618.96
8.2.250.0070.00716.54
8.2.240.0060.01218.86
8.2.230.0030.00622.58
8.2.220.0060.00324.06
8.2.210.0060.01226.77
8.2.200.0060.00316.38
8.2.190.0070.01016.58
8.2.180.0070.00716.50
8.2.170.0070.00722.96
8.2.160.0080.01122.09
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00421.04
8.2.120.0040.00426.35
8.2.110.0100.00019.24
8.2.100.0120.00817.84
8.2.90.0040.00417.75
8.2.80.0040.00418.73
8.2.70.0040.00417.63
8.2.60.0000.00917.63
8.2.50.0050.00317.55
8.2.40.0000.00820.78
8.2.30.0040.00419.31
8.2.20.0020.00518.12
8.2.10.0040.00419.29
8.2.00.0000.00718.18
8.1.330.0090.00721.82
8.1.320.0110.00416.22
8.1.310.0170.00016.49
8.1.300.0090.01217.81
8.1.290.0050.00530.84
8.1.280.0110.00425.92
8.1.270.0080.00020.23
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0080.00017.65
8.1.230.0000.01219.42
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0080.00017.22
8.1.190.0030.00617.10
8.1.180.0040.00418.10
8.1.170.0060.00318.56
8.1.160.0050.00218.80
8.1.150.0000.00718.92
8.1.140.0040.00420.23
8.1.130.0060.00020.31
8.1.120.0000.00717.36
8.1.110.0000.00717.50
8.1.100.0030.00817.34
8.1.90.0040.00417.45
8.1.80.0040.00417.34
8.1.70.0030.00517.43
8.1.60.0030.00517.63
8.1.50.0040.00417.52
8.1.40.0040.00417.53
8.1.30.0040.00417.62
8.1.20.0000.00817.65
8.1.10.0000.00817.58
8.1.00.0030.00517.48
8.0.300.0070.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.47
8.0.270.0030.00317.26
8.0.260.0030.00318.45
8.0.250.0030.00316.84
8.0.240.0000.00616.95
8.0.230.0030.00317.02
8.0.220.0060.00316.82
8.0.210.0030.00316.82
8.0.200.0000.00716.93
8.0.190.0070.00016.97
8.0.180.0040.00416.91
8.0.170.0040.00416.93
8.0.160.0070.00016.86
8.0.150.0030.00316.71
8.0.140.0000.00716.91
8.0.130.0030.00313.34
8.0.120.0030.00516.76
8.0.110.0000.00716.87
8.0.100.0040.00416.85
8.0.90.0040.00416.96
8.0.80.0000.01416.88
8.0.70.0000.00716.96
8.0.60.0050.00216.79
8.0.50.0000.00816.88
8.0.30.0120.00716.88
8.0.20.0120.01916.86
8.0.10.0040.00416.88
8.0.00.0130.00916.74
7.4.330.0020.00215.55
7.4.320.0000.00616.50
7.4.300.0070.00016.61
7.4.290.0070.00016.52
7.4.280.0000.00716.37
7.4.270.0040.00416.53
7.4.260.0000.00716.52
7.4.250.0070.00016.38
7.4.240.0000.00716.47
7.4.230.0050.00316.54
7.4.220.0040.00416.67
7.4.210.0050.01116.58
7.4.200.0070.00016.53
7.4.160.0060.01016.59
7.4.140.0120.01217.86
7.4.130.0120.02016.36
7.4.120.0140.00716.54
7.4.110.0140.00316.52
7.4.100.0060.01616.42
7.4.90.0110.00616.45
7.4.80.0060.01219.39
7.4.70.0070.01116.46
7.4.60.0080.00816.50
7.4.50.0120.00316.59
7.4.40.0120.00516.25
7.4.00.0030.00914.77
7.3.330.0000.00513.14
7.3.320.0050.00013.09
7.3.310.0030.00316.11
7.3.300.0030.00316.27
7.3.290.0030.00316.16
7.3.280.0070.01116.27
7.3.260.0090.00916.41
7.3.240.0100.00816.42
7.3.230.0120.00916.37
7.3.210.0100.00616.26
7.3.200.0100.00716.42
7.3.190.0090.00916.56
7.3.180.0060.01316.47
7.3.170.0100.00716.54
7.3.160.0060.01016.61
7.3.30.0000.01314.74
7.3.20.8540.00714.60
7.3.10.2220.00614.70
7.3.00.0100.00714.78
7.2.330.0060.01216.73
7.2.320.0150.00616.73
7.2.310.0080.00816.83
7.2.300.0080.00816.58
7.2.290.0070.01016.69
7.2.160.0040.01114.80
7.2.150.2320.00715.11
7.2.140.8820.00715.19
7.2.130.0440.00014.91
7.2.120.2160.00715.09
7.2.110.0360.00015.11
7.2.100.0160.01314.91
7.2.90.0120.01615.04
7.2.80.0110.00715.00
7.2.70.0750.00614.80
7.2.60.0180.01215.14
7.2.50.0120.00914.82
7.2.40.0520.01415.09
7.2.30.0310.00014.88
7.2.20.0330.00715.14
7.2.10.0180.00415.11
7.2.00.0200.01014.98
7.1.270.9910.00013.64
7.1.260.0070.01013.78
7.1.250.0440.00913.76

preferences:
30.49 ms | 403 KiB | 5 Q