3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function cleanstring($string) { $unwanted = array("’","'",";",".",":","’"); echo "cleaned: ".str_replace($unwanted, "", $string)."\n"; } $string = "Bob’s Burgers Season 1 Episode 1"; cleanstring($string); $string = "Bob's Burgers Season 2"; cleanstring($string);
based on mH1cj
Output for 5.3.19 - 7.2.6
cleaned: Bobs Burgers Season 1 Episode 1 cleaned: Bobs Burgers Season 2