3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phrase_array = str_split("wo-rd"); $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<$cleanse_length-1;$x++){ for($z=0;$z<$phrase_length-1;$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("word")); echo 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.70.0090.00916.63
8.3.60.0120.00616.36
8.3.50.0090.00921.92
8.3.40.0040.01118.72
8.3.30.0120.00318.86
8.3.20.0060.00321.90
8.3.10.0080.00020.09
8.3.00.0000.00820.83
8.2.190.0130.01016.88
8.2.180.0220.00016.75
8.2.170.0120.00322.96
8.2.160.0040.01120.47
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00419.76
8.2.120.0030.00526.35
8.2.110.0090.00321.18
8.2.100.0090.00318.05
8.2.90.0040.00419.19
8.2.80.0100.00017.97
8.2.70.0060.00317.63
8.2.60.0060.00317.93
8.2.50.0050.00318.10
8.2.40.0000.00820.59
8.2.30.0050.00319.28
8.2.20.0040.00418.12
8.2.10.0050.00318.13
8.2.00.0040.00418.38
8.1.280.0070.00725.92
8.1.270.0080.00023.88
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0040.00422.25
8.1.230.0040.00717.64
8.1.220.0060.00317.74
8.1.210.0080.00018.77
8.1.200.0050.00517.23
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0040.00418.57
8.1.160.0000.00718.95
8.1.150.0000.00820.32
8.1.140.0050.00319.59
8.1.130.0000.00918.94
8.1.120.0030.00517.52
8.1.110.0040.00417.49
8.1.100.0020.00517.45
8.1.90.0000.00817.43
8.1.80.0030.00617.47
8.1.70.0030.00317.46
8.1.60.0000.00817.61
8.1.50.0070.00017.42
8.1.40.0040.00417.57
8.1.30.0040.00417.56
8.1.20.0040.00417.72
8.1.10.0080.00017.58
8.1.00.0040.00417.51
8.0.300.0040.00418.77
8.0.290.0000.00916.88
8.0.280.0070.00018.50
8.0.270.0030.00317.18
8.0.260.0050.00217.27
8.0.250.0000.00717.02
8.0.240.0040.00416.95
8.0.230.0070.00016.86
8.0.220.0040.00416.90
8.0.210.0040.00416.89
8.0.200.0000.01017.03
8.0.190.0030.00516.98
8.0.180.0050.00216.91
8.0.170.0040.00416.82
8.0.160.0000.00716.92
8.0.150.0030.00316.84
8.0.140.0040.00416.73
8.0.130.0000.00513.29
8.0.120.0080.00016.76
8.0.110.0000.00716.95
8.0.100.0040.00416.86
8.0.90.0000.00817.02
8.0.80.0110.00416.88
8.0.70.0000.00716.69
8.0.60.0030.00516.70
8.0.50.0040.00416.89
8.0.30.0130.00516.95
8.0.20.0090.01317.40
8.0.10.0040.00416.91
8.0.00.0110.00716.79
7.4.330.0030.00315.55
7.4.320.0000.00616.54
7.4.300.0030.00316.46
7.4.290.0000.00716.63
7.4.280.0060.00316.52
7.4.270.0070.00016.51
7.4.260.0040.00416.57
7.4.250.0050.00316.57
7.4.240.0000.00716.62
7.4.230.0070.00016.51
7.4.220.0070.01116.44
7.4.210.0050.00916.60
7.4.200.0070.00016.60
7.4.160.0110.00816.59
7.4.150.0000.01717.40
7.4.140.0090.00817.86
7.4.130.0100.00816.48
7.4.120.0120.00616.46
7.4.110.0070.01316.61
7.4.100.0110.00716.46
7.4.90.0070.01516.41
7.4.80.0100.00719.39
7.4.70.0030.01416.53
7.4.60.0080.00816.51
7.4.50.0030.01016.66
7.4.40.0060.01016.73
7.4.30.0110.00516.38
7.4.00.0070.01214.96
7.3.330.0000.00513.08
7.3.320.0000.00613.11
7.3.310.0040.00416.39
7.3.300.0000.00716.13
7.3.290.0030.00616.32
7.3.280.0090.00916.28
7.3.270.0100.00717.40
7.3.260.0040.01516.36
7.3.250.0080.00916.39
7.3.240.0130.00316.37
7.3.230.0090.00916.50
7.3.210.0030.01316.55
7.3.200.0130.00316.19
7.3.190.0090.00616.61
7.3.180.0060.01316.55
7.3.170.0090.00916.52
7.3.160.0080.00816.40
7.3.120.0090.00915.00
7.3.110.0100.00715.12
7.3.100.0030.01314.75
7.3.90.0000.01514.93
7.3.80.0080.00814.96
7.3.70.0100.00314.77
7.3.60.0070.00714.50
7.3.50.0030.01014.96
7.3.40.0120.00014.66
7.3.30.0070.01014.84
7.3.20.0080.00816.66
7.3.10.0090.00616.63
7.3.00.0000.01316.41
7.2.330.0070.01016.54
7.2.320.0130.01016.63
7.2.310.0090.00916.46
7.2.300.0130.01016.77
7.2.290.0090.01216.75
7.2.250.0000.02115.16
7.2.240.0000.02015.15
7.2.230.0100.00314.92
7.2.220.0070.00715.09
7.2.210.0000.01015.27
7.2.200.0030.01314.84
7.2.190.0030.00714.92
7.2.180.0070.00715.17
7.2.170.0130.00015.23
7.2.160.0060.01015.16
7.2.150.0060.00317.08
7.2.140.0110.00616.71
7.2.130.0030.00916.82
7.2.120.0070.01016.73
7.2.110.0090.00616.94
7.2.100.0070.01116.77
7.2.90.0040.00816.96
7.2.80.0100.00316.73
7.2.70.0070.00716.89
7.2.60.0060.01116.95
7.2.50.0040.01116.76
7.2.40.0040.01416.98
7.2.30.0040.01116.80
7.2.20.0030.01016.98
7.2.10.0040.01216.54
7.2.00.0030.01416.93
7.1.330.0040.01415.82
7.1.320.0120.00315.72
7.1.310.0070.00415.89
7.1.300.0030.00615.75
7.1.290.0050.00515.82
7.1.280.0070.00715.80
7.1.270.0060.00615.69
7.1.260.0000.01615.60
7.1.250.0000.01515.81
7.1.240.0030.00615.89
7.1.230.0060.00615.85
7.1.220.0030.01015.76
7.1.210.0060.00615.77
7.1.200.0000.01215.66
7.1.190.0080.00315.73
7.1.180.0070.00715.81
7.1.170.0090.00015.82
7.1.160.0030.00615.71
7.1.150.0030.01015.91
7.1.140.0070.00715.86
7.1.130.0060.00915.77
7.1.120.0060.00615.92
7.1.110.0000.01015.68
7.1.100.0130.00315.68
7.1.90.0040.00415.64
7.1.80.0040.00815.92
7.1.70.0030.00816.44
7.1.60.0070.00716.54
7.1.50.0040.01115.71
7.1.40.0000.01415.55
7.1.30.0000.01315.95
7.1.20.0120.03528.05
7.1.10.0140.03019.05
7.1.00.0060.03319.06
7.0.330.0130.00015.46
7.0.320.0080.00015.53
7.0.310.0100.00315.22
7.0.300.0150.00015.26
7.0.290.0000.01115.41
7.0.280.0060.00615.43
7.0.270.0070.01015.29
7.0.260.0030.00615.30
7.0.250.0080.00415.55
7.0.240.0070.00715.23
7.0.230.0040.00715.33
7.0.220.0080.00415.59
7.0.210.0070.00315.34
7.0.200.0020.01115.86
7.0.190.0040.00415.52
7.0.180.0060.00315.46
7.0.170.0000.00815.39
7.0.160.0060.03118.50
7.0.150.0050.03218.68
7.0.140.0050.03118.63
7.0.130.0080.02918.58
7.0.120.0030.03518.68
7.0.110.0070.03318.57
7.0.100.0050.03318.69
7.0.90.0070.03818.65
7.0.80.0070.04218.52
7.0.70.0070.03018.66
7.0.60.0080.02818.57
7.0.50.0030.03518.64
7.0.40.0070.03217.82
7.0.30.0020.03617.74
7.0.20.0090.02717.77
7.0.10.0030.03417.73
7.0.00.0040.03417.76
5.6.400.0030.00914.67
5.6.390.0120.00314.03
5.6.380.0060.00914.06
5.6.370.0040.00714.59
5.6.360.0100.00314.47
5.6.350.0070.00414.11
5.6.340.0000.01314.53
5.6.330.0130.00314.43
5.6.320.0110.00314.19
5.6.310.0040.00814.64
5.6.300.0040.00714.34
5.6.290.0070.00714.35
5.6.280.0100.00314.29
5.6.270.0070.00314.08
5.6.260.0100.00314.50
5.6.250.0040.01114.33
5.6.240.0030.01014.55
5.6.230.0070.00714.39
5.6.220.0070.00414.71
5.6.210.0070.00314.23
5.6.200.0110.00314.57
5.6.190.0040.00914.32
5.6.180.0030.00714.55
5.6.170.0060.00314.31
5.6.160.0100.00714.67
5.6.150.0040.00414.11
5.6.140.0040.00814.63
5.6.130.0000.01214.31
5.6.120.0030.01214.44
5.6.110.0060.01014.35
5.6.100.0030.01314.32
5.6.90.0090.00614.32
5.6.80.0100.00614.41
5.6.70.0000.01414.32
5.6.60.0090.00614.17
5.6.50.0100.00314.47
5.6.40.0090.00614.21
5.6.30.0030.01114.21
5.6.20.0000.01414.63
5.6.10.0030.01014.16
5.6.00.0000.01514.20

preferences:
33.27 ms | 401 KiB | 5 Q