@ 2017-02-17T18:06:30Z <?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);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 5.6.0 - 5.6.40 , 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.4 , 8.3.6 1 Output for 8.3.5 Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
1 preferences:dark mode live preview
220.57 ms | 402 KiB | 288 Q