Re: PHP extensions dependencies

From: Date: Fri, 04 May 2012 09:50:38 +0000
Subject: Re: PHP extensions dependencies
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-9363@lists.php.net to get a copy of this message
hi, On Fri, May 4, 2012 at 11:43 AM, Samuel ROZE <samuel.roze@gmail.com> wrote: > I'm writing a PHP extension and I've got a problem: is there a way to > include another module's functions in my own? Actually, I want to use some > internals functions of a module and access to these globals (xdebug) in my > own. > > For instance, if I want to use the "xdebug_error_type" function, which is > in the "xdebug_var.c" file, can I just include the "xdebug_var.h" (which I > need to copy in my own module because it isn't saved when installing > "php-dev/xdebug" on Gentoo) and them call the function? This function has to be exported (PHP_API + headers installed). > Is there another way? Is it possible? Using what call_user_func does and call the function as it was done from userland. See php's function doing that for an example (plenty in ext/standard :) Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org

« previous php.pecl.dev (#9363) next »