3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function safeEval($arg,$badwords) { if(stripos($arg,$badwords) === true) //$arg = explode("''",$arg); //$bardwords = array($badwords); //if(in_array($badwords,$arg)) { str_ireplace($badwords,"''",$arg); //$arg = $arg; eval($arg); //return; } else eval($arg); } $string = "echo 'Hello drop Kyle';"; $find = "update","drop"; safeEval($string,$find);
Output for 5.3.0 - 5.4.15
Parse error: syntax error, unexpected ',' in /in/LOV3Y on line 18
Process exited with code 255.