I'm dabbling with creating a PHP extension for a personal project. Beyond what's linked in the above article I have no knowledge of the zend_engine, and my C skills are 10 years out of date, and were only ever academic. All of which is to say "If it seems like I'm asking a dumb question, I probably am".
Is it possible to call functions from other PHP extensions in my own extension, or is each PHP extension considered an island, with no insight into other parts of the system? If this is possible, is it common practice, or a Bad Idea™?
That is, I know I can return a string with something like this.
PHP_FUNCTION(hello_world)
{
char *str;
str = estrdup("Hello World");
RETURN_STRING(str, 0);
}
I'd like to be able to return, say, a SimpleXML element, or a DomDocument element. Googling has proven difficult, as there's not a ton out there about extension development, and there IS a ton out there about standard PHP usage.