Re: Re: [Text_Highlight] eval() Vs call_user_func()...
| From: | Stefan Neufeind | Date: | Thu, 08 Apr 2004 10:56:39 +0000 |
| Subject: | Re: Re: [Text_Highlight] eval() Vs call_user_func()... | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27179@lists.php.net to get a copy of this message | ||
On 8 Apr 2004 at 18:47, Alan Knowles wrote:
> > $func = array("Text_Highlight_Php", "highlight");
> > $func($code);
>
> that shouldnt work..
Hehe - really doesn't - tried!
> 2 ways to do this:
> a) call_user_func
> b) create an instance eg.
> $class = $this->highlightclass;
> $o = new $class;
> $o->highlight(....)
Doing a call_user_func is imho the best solution, since he only
wanted to call a static function.
Stefan