3v4l.org

run code in 300+ PHP versions simultaneously
<?php function CountRepeats_nonletters($first_input, $second_input) { $phrase_array = str_split($second_input); $cleanse = array("!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "_", "+", "=", "\\", "|", "}", "]", "[", "{", "'", '"', "?", "/", ".", ">", ",", "<"); $non_alpha_num = !empty(array_intersect($cleanse, $phrase_array)); $cleanse_length = count($cleanse); $phrase_length = count($phrase_array); if($non_alpha_num){ for($x=0;$x<27;$x++){ for($z=0;$z<$phrase_length-2;$z++) if($phrase_array[$z] == $cleanse[$x]){ $match = array_search($cleanse[$x], $phrase_array); array_splice($phrase_array, $match, 1); } } } $cleanse_phrase = implode("", $phrase_array); $phrase_array = explode(" ", strtolower($cleanse_phrase)); $search_value = array_keys($phrase_array, strtolower($first_input)); return count($search_value); }

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.0100.01016.50
8.3.50.0130.00719.61
8.3.40.0120.00318.47
8.3.30.0040.01118.52
8.3.20.0000.00721.90
8.3.10.0040.00420.34
8.3.00.0000.00820.99
8.2.180.0100.01016.63
8.2.170.0070.00722.96
8.2.160.0070.00720.47
8.2.150.0030.00524.18
8.2.140.0030.00624.66
8.2.130.0040.00419.64
8.2.120.0080.00026.35
8.2.110.0060.00320.53
8.2.100.0070.00417.59
8.2.90.0040.00418.98
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0040.00417.80
8.2.50.0030.00518.10
8.2.40.0000.00920.65
8.2.30.0070.00020.98
8.2.20.0040.00417.84
8.2.10.0030.00517.86
8.2.00.0040.00418.04
8.1.280.0070.00725.92
8.1.270.0140.00724.02
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00322.10
8.1.230.0060.00617.58
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0040.00417.23
8.1.190.0050.00317.10
8.1.180.0080.00018.10
8.1.170.0030.00518.50
8.1.160.0070.00018.66
8.1.150.0050.00320.21
8.1.140.0050.00319.40
8.1.130.0000.00918.87
8.1.120.0070.00017.35
8.1.110.0060.00317.34
8.1.100.0000.00817.24
8.1.90.0000.00717.36
8.1.80.0000.00817.34
8.1.70.0000.00717.30
8.1.60.0080.00017.43
8.1.50.0030.00617.41
8.1.40.0000.00817.45
8.1.30.0030.00517.49
8.1.20.0000.00917.48
8.1.10.0040.00417.28
8.1.00.0050.00217.20
8.0.300.0080.00018.77
8.0.290.0080.00016.58
8.0.280.0000.00718.35
8.0.270.0050.00217.24
8.0.260.0000.00817.05
8.0.250.0000.00816.83
8.0.240.0040.00416.82
8.0.230.0000.00716.78
8.0.220.0080.00016.79
8.0.210.0070.00016.76
8.0.200.0070.00316.72
8.0.190.0080.00016.82
8.0.180.0070.00016.72
8.0.170.0040.00416.70
8.0.160.0070.00016.72
8.0.150.0030.00416.80
8.0.140.0030.00316.73
8.0.130.0030.00313.14
8.0.120.0040.00416.70
8.0.110.0040.00416.75
8.0.100.0070.00016.84
8.0.90.0000.00816.57
8.0.80.0090.00616.78
8.0.70.0040.00416.55
8.0.60.0050.00216.79
8.0.50.0040.00416.88
8.0.30.0070.01116.88
8.0.20.0090.00917.40
8.0.10.0070.00016.70
8.0.00.0080.00816.51
7.4.330.0000.00515.55
7.4.320.0000.00716.34
7.4.300.0000.00616.37
7.4.290.0000.00716.52
7.4.280.0040.00416.27
7.4.270.0030.00616.42
7.4.260.0040.00416.36
7.4.250.0070.00016.30
7.4.240.0000.00816.39
7.4.230.0030.00316.36
7.4.220.0030.01416.40
7.4.210.0080.00716.53
7.4.200.0030.00316.22
7.4.160.0130.00416.36
7.4.150.0110.00517.40
7.4.140.0110.01917.86
7.4.130.0090.00916.31
7.4.120.0100.00716.40
7.4.110.0080.01116.52
7.4.100.0110.00716.11
7.4.90.0070.01016.32
7.4.80.0110.00519.39
7.4.70.0090.00916.39
7.4.60.0110.00616.37
7.4.50.0000.01016.42
7.4.40.0060.01016.34
7.4.30.0100.00716.25
7.4.00.0060.00914.49
7.3.330.0000.00513.02
7.3.320.0050.00013.02
7.3.310.0030.00316.05
7.3.300.0030.00316.18
7.3.290.0040.00416.23
7.3.280.0080.01016.16
7.3.270.0060.01217.40
7.3.260.0090.01216.40
7.3.250.0120.00616.26
7.3.240.0080.00816.31
7.3.230.0090.01216.26
7.3.210.0130.00416.27
7.3.200.0080.00816.49
7.3.190.0140.00716.20
7.3.180.0130.00616.35
7.3.170.0060.01016.10
7.3.160.0060.01016.24
7.2.330.0040.01516.40
7.2.320.0100.00616.20
7.2.310.0140.00716.42
7.2.300.0110.01116.56
7.2.290.0120.00616.56
7.2.60.0230.01016.71
7.2.50.0000.01216.79
7.1.200.0070.00315.66
7.1.70.0090.00016.64
7.1.60.0000.01117.19
7.1.20.0300.05740.40
7.1.10.0030.06722.18
7.1.00.0070.05722.42
7.0.200.0040.00416.66
7.0.160.0030.06721.73
7.0.150.0130.05021.90
7.0.140.0100.05321.82
7.0.130.0100.05721.93
7.0.120.0100.05321.71
7.0.110.0100.05321.84
7.0.100.0070.06021.88
7.0.90.0070.06321.89
7.0.80.0100.05321.86
7.0.70.0170.06021.88
7.0.60.0130.05021.83
7.0.50.0170.06721.88
7.0.40.0070.05321.84
7.0.30.0100.05021.82
7.0.20.0100.05321.83
7.0.10.0070.06021.92
7.0.00.0030.06021.89

preferences:
44.89 ms | 401 KiB | 5 Q