Cpt John W. Holmes wrote: > From: "david" <[EMAIL PROTECTED]> > > >> i found a solution (hopefully) with: >> >> if(function_exists($function)){ >> eval('$return = $function($input);'); >> }else{ >> // function does not exists >> } >> >> which works quit nicely for now. not sure if that's a good thing to do. > > Why not just do this: > > if(function_exists($function)) > { $return = $function($input); } > else > { //function does not exist; } >
because i didn't know PHP can do that. thanks for the tip! any differences between the 2 version in turns of performance and safety? david -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php