Rob Richards wrote:
From: Andi Gutmans
zend_is_executing() might work, but that is only if this method can only
be
called during script execution (which I'm not sure of). I'm also not sure if this is reset to 0 at the end of each request but that should be easy
to
fix.
Yup, this method should only be called during a request. I tested it out with mod_xslt and it seemed to work correctly. mod_xslt would safely exit from the function ignoring our streams handler. It seems to reset to 0 after a php script hits it, as a subsequent calls to the mod_xslt handler continuted to function correctly. The only question I have is will there be any problems if run in threaded mode as TSRMLS_FETCH() needs to be called.
Well, the threaded case is very much a "who cares" scenario. Crash once every hundred requests, crash once every thousand - add them up and it might be real money some day.
Serially, if someone wants to share a shared library between two separate third party software products in a threaded environment - i'll keep them in my nightly prayers.
-sterling
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php