[
note: this is an edit of the post, figured I could word this better:
I need to have a call to a non-existent function still generate a notice (so I can know it happened), but not be a fatal error (so the program will still run). Is this possible?
e.g.:
change_reporting_somehow();
ob_start();
$client_code = 'bad_function()' ;
eval ( '$result= ' . $client_code.';' );
$x=ob_get_contents();
ob_end_clean();
restore_reporting_somehow();
if($x){
echo 'Sorry, we can't execute that code';
}else{
echo $result;
}
]
I want to give a limited access for an intranet to use php code on the website.
the code will be handled by an eval() function.
How do I lower the error reporting level so that calls to undefined functions won't kill the script then increase the error reporting level after the eval is done?
Thanks.