Hi all, I've been working on an extension which contains a "debugging function". This function uses zend_printf() to print a list of extension-specific information / help instructions to the screen, in a similar manner to phpinfo().
It was pointed out to me that this might be a useful function to keep in, in a tidied-up form, when the extension is finished. I'm trying to ascertain the correct way to terminate the entire calling php script, after print-out, once this function has been called. There seem to be a number of ways of trying to do this, but I was wondering if there is a well-established, correct methodology in standard use. I had a good look at the source in the /ext directory, but none of the extensions I looked at seem to implement this behaviour, and I've scoured the /Zend directory, but not managed to find anything. [I freely concede that I could be being an incompetent blind eejit, as I'm usually a C++/Java guy, and all that pre-processor action has left #-marks burned into my retina. :)] The behaviour I'm after is something like that of zend_error(E_ERROR, ...), but without the printout. One method I'd considered is to change local value of 'error_reporting' / 'display_errors' and do just that, but this might have an impact on log output, or may not be correct. Another idea was to call exit() from the global function table using call_user_function_ex(). It occurred to me, though, that this might be dangerous, given the thread resource manager and particularly the memory-allocation behaviour of the fourth argument - the return value zval** (or is specifying NULL / 0 acceptable here?). I'm not sure I'd want to be allocating heap immediately before exiting etc. Are either of these methods valid, or are they totally screwy / dangerous? Is there an established method for doing this? As you can probably gather, I'm slightly confused. Any pointers would be much appreciated. Apologies if this is not the right list for these matters. Cris ___________________________________________________________ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself http://uk.messenger.yahoo.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php