<?php
function safeEval($arg,$badwords)
{
//if(stripos($arg,$badwords) !== false)
$arg = explode("''",$arg);
$bardwords = array();
if(in_array($badwords,$arg))
{
str_ireplace($badwords,"''",$arg)
//echo "it has been found";
return;
}
else
return eval($arg);
}
$string = "echo 'Hello drop Kyle';";
$find = array("update","drop");
safeEval($string,$find);
- Output for 5.4.0 - 5.4.15
- Parse error: syntax error, unexpected 'return' (T_RETURN) in /in/5koXU on line 11
Process exited with code 255. - Output for 5.3.0 - 5.3.25
- Parse error: syntax error, unexpected T_RETURN in /in/5koXU on line 11
Process exited with code 255.
preferences:
187.77 ms | 1395 KiB | 49 Q