3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = "meno go you to from"; $regexoo = array('to','go'); $text =str_replace($regexoo, '***', $url); echo $text; echo "<hr><br>"; $str = "first بل baseball for all"; $pattern = array('/\b(بل|all|first)\b/i',); $str = preg_replace($pattern, "FOUND", $str); echo $str; ?> <p><hr></p> <?php $atag ="على ذهب الى من طول فى يشسيشيشي مصطفى حسني where then"; $pattern = array('/\b(then|فى|على|من||طول|where)\b/i',); $atag = preg_replace($pattern, " ", $atag ); echo $atag ;
based on L3VYQ
Output for 4.3.0 - 7.2.0
meno *** you *** from<hr><br>FOUND بل baseball for FOUND<p><hr></p> على ذهب الى من طول فى يشسيشيشي مصطفى حسني