3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function safeEval($arg,$badwords) { if(strpos($arg,$badwords) === true) { echo "it has been found"; return; } else return eval($arg); } $string = "echo 'Hello Kyle';"; $find = "Kyle"; safeEval($string,$find);
Output for 4.3.0 - 7.1.0
Hello Kyle