Hello. I have some functions that I utilize an eval to run. I need to currently run things this way, so rebuilding right now isn't an option. Anyway, I was wondering if there were a way to determine if a passed in parameter (function name and its parameters) were valid and only do an eval if they are...something like the following:
###defined functions###
function helloworld()
{
print "Hello, world";
}
#################
###other script###
$passedfunction="helloworld";
If($passedfunction==valid function for scripts/app)
{
eval($passedfunction.";");
}
else
{
die("Not a valid local function");
}
#################