Re: Zend API for calling user functions ?
| From: | thies at digicol dot de | Date: | Thu, 22 Jun 2000 13:35:41 +0000 |
| Subject: | Re: Zend API for calling user functions ? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-21962@lists.php.net to get a copy of this message | ||
On Thu, Jun 22, 2000 at 03:28:33PM +0200, Laurent Bossavit wrote:
> Hi all,
>
> I'm developing a PHP4 extension in which it would be useful to be
> able to call arbitrary functions; is it at all possible, and if so is
> there a recommended way, of doing the following :
search for call_user_function_ex in the php4 sources
(ext/standard) - you'll find a few samples on how to do that.
tc
>
> <?
> function my_function($x,$y,$z) {
> return $x+$y+$z;
> }
> $args = array(1,2,3);
> $result = php_extension_do_fncall("my_function",$args);
> if ($result == my_function(1,2,3)) {
> echo "success !";
> }
> ?>
>
>
> ========================================
> Laurent Bossavit - Ingénieur R&D
> >>> laurent@mmania.com <<<
> >> ICQ#39281367 <<
> MultiMania http://www.multimania.fr/
> ========================================
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany