3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TEXT rkenbgjengrnekjrgn2ioih34fnorfejk TEXT; $char = array_merge(range("a", "z"), range("A", "Z")); $length = strlen($text); $counter = array(); for($i = 0; $i < $length; $i++) { $item = $text[$i]; if (in_array($item, $char)) { $counter[$item] = isset($counter[$item]) ? $counter[$item] + 1 : 0; } } asort($counter); var_dump($counter);

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.0110.00716.63
8.3.50.0100.01021.13
8.3.40.0040.01118.70
8.3.30.0080.00818.67
8.3.20.0050.00220.33
8.3.10.0080.00023.71
8.3.00.0040.00423.61
8.2.180.0140.00418.51
8.2.170.0110.00422.96
8.2.160.0140.00020.18
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0000.00819.76
8.2.120.0040.00426.35
8.2.110.0060.00321.11
8.2.100.0030.01017.68
8.2.90.0060.00319.05
8.2.80.0080.00017.97
8.2.70.0030.00617.63
8.2.60.0000.01218.04
8.2.50.0080.00018.07
8.2.40.0000.00820.55
8.2.30.0050.00219.44
8.2.20.0000.00717.59
8.2.10.0000.00717.96
8.2.00.0060.00318.08
8.1.280.0070.01425.92
8.1.270.0060.00323.97
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0090.00022.38
8.1.230.0080.00319.02
8.1.220.0000.00817.78
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.00817.12
8.1.180.0050.00318.10
8.1.170.0040.00418.29
8.1.160.0040.00420.69
8.1.150.0040.00418.92
8.1.140.0040.00419.54
8.1.130.0030.00317.61
8.1.120.0040.00417.32
8.1.110.0040.00417.27
8.1.100.0030.00617.31
8.1.90.0000.00817.44
8.1.80.0030.00517.31
8.1.70.0000.00917.38
8.1.60.0000.00817.53
8.1.50.0000.00817.50
8.1.40.0040.00417.37
8.1.30.0030.00717.59
8.1.20.0040.00417.47
8.1.10.0020.00517.46
8.1.00.0030.00617.42
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0070.00018.31
8.0.270.0040.00417.11
8.0.260.0000.00817.24
8.0.250.0030.00316.96
8.0.240.0060.00316.98
8.0.230.0070.00016.86
8.0.220.0030.00316.88
8.0.210.0000.00716.91
8.0.200.0000.00716.97
8.0.190.0050.00316.89
8.0.180.0070.00316.98
8.0.170.0030.00616.92
8.0.160.0050.00216.82
8.0.150.0040.00416.75
8.0.140.0000.00716.89
8.0.130.0030.00313.39
8.0.120.0040.00416.88
8.0.110.0040.00316.87
8.0.100.0000.00716.86
8.0.90.0070.00016.78
8.0.80.0110.00616.79
8.0.70.0030.00516.95
8.0.60.0000.00716.83
8.0.50.0000.00716.97
8.0.30.0140.00416.90
8.0.20.0140.00517.40
8.0.10.0040.00417.04
8.0.00.0110.00816.70
7.4.330.0020.00216.72
7.4.320.0040.00416.45
7.4.300.0030.00316.53
7.4.290.0060.00316.43
7.4.280.0030.00616.54
7.4.270.0040.00416.58
7.4.260.0070.00016.49
7.4.250.0070.00016.49
7.4.240.0030.00416.56
7.4.230.0000.00816.54
7.4.220.0030.01616.43
7.4.210.0110.00416.61
7.4.200.0070.00016.30
7.4.160.0130.00316.39
7.4.150.0090.00917.40
7.4.140.0090.01317.86
7.4.130.0060.01216.38
7.4.120.0060.01216.50
7.4.110.0150.01216.61
7.4.100.0070.01316.48
7.4.90.0150.00316.46
7.4.80.0030.01619.39
7.4.70.0060.01016.33
7.4.60.0110.00616.43
7.4.50.0130.00016.34
7.4.40.0150.00416.59
7.4.30.0100.00716.84
7.4.00.0060.00914.70
7.3.330.0000.00513.24
7.3.320.0050.00013.32
7.3.310.0030.00316.28
7.3.300.0000.00716.43
7.3.290.0000.00716.40
7.3.280.0050.01416.45
7.3.270.0240.02017.40
7.3.260.0090.00916.32
7.3.240.0050.01316.56
7.3.230.0000.01916.40
7.3.210.0120.00616.40
7.3.200.0110.00519.39
7.3.190.0140.00616.45
7.3.180.0030.01316.38
7.3.170.0170.00016.48
7.3.160.0090.00916.74
7.2.330.0070.01016.80
7.2.320.0130.00616.81
7.2.310.0000.01716.67
7.2.300.0130.00316.37
7.2.290.0100.00716.58
7.2.60.0040.01116.96
7.2.00.0030.00919.11
7.1.200.0070.00415.84
7.1.100.0130.00617.93
7.1.70.0040.00417.22
7.1.60.0180.00719.30
7.1.50.0060.00616.86
7.1.00.0070.07322.51
7.0.200.0120.00016.74
7.0.60.0200.08021.73
7.0.50.0130.07017.81
7.0.40.0070.07720.23
7.0.30.0230.04320.09
7.0.20.0230.08320.21
7.0.10.0100.05320.18
7.0.00.0000.10020.16
5.6.280.0030.03720.90
5.6.210.0070.08320.71
5.6.200.0000.04318.17
5.6.190.0030.09020.39
5.6.180.0530.06720.56
5.6.170.0330.07320.42
5.6.160.0070.08320.52
5.6.150.0030.07718.08
5.6.140.0130.07718.14
5.6.130.0100.07718.22
5.6.120.0200.07320.97
5.6.110.0030.08720.97
5.6.100.0030.04321.09
5.6.90.0130.06021.06
5.6.80.0030.04020.46
5.5.350.0230.06720.41
5.5.340.0070.07718.01
5.5.330.0130.07020.46
5.5.320.0700.07020.50
5.5.310.0200.05720.20
5.5.300.0030.04317.95
5.5.290.0070.08718.01
5.5.280.0030.04020.84
5.5.270.0130.08320.83
5.5.260.0100.08320.64
5.5.250.0100.08020.70
5.5.240.0100.08020.12

preferences:
53.16 ms | 401 KiB | 5 Q