Re: downgrade undefined function from fatal error

From: Date: Fri, 13 Dec 2002 13:57:42 +0000
Subject: Re: downgrade undefined function from fatal error
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-92452@lists.php.net to get a copy of this message
On Fri, 13 Dec 2002, Dave [Hawk-Systems] wrote: ... > <?PHP > function func($f_name){ > if(!function_exists($f_name)){ > # function doesn't exists, needs to be included > require('/path/to/functions/'.$f_name.'.php'); > }else{ > # function already exists, no action required > } > return $f_name; > } > > $database=call_user_func(func('DatabaseConnect'),'var1','var2'); > ?> > > But this results in code that isn't quite as intuitive. > > Thoughts? Comments? "You are nuts"? "You are nuts" (read the archives, this was discussed before) Derick -- ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ -------------------------------------------------------------------------

« previous php.dev (#92452) next »