Re: Calling functions which names are inside a variable

From: Date: Sun, 26 Aug 2007 22:19:45 +0000
Subject: Re: Calling functions which names are inside a variable
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-261308@lists.php.net to get a copy of this message
On Sun, August 26, 2007 12:46 am, Robert Keizer wrote: > I am currently working on a module testing class, I can't seem to find > the > correct syntax. Here is an example of the problem: > > function foo( $var ){ > include $var.'.php'; > return $var(); // <!------- problem Try this: return ($var()); Not sure it's the answer, but suspect it might be. And 'somefunction' *IS* defined, right?... > }; -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#261308) next »