Hello
I'm writing a PHP extension where I'm using a custom library. This
library uses a structure that needs to be initialized once per server
instance. First I initialized it in each of my functions and
deinitialize it ant the end. It works ok, but unfortunetly it turns to
be to slow. So, I'm trying to do it globally. Everything in that library
is internally synchronized, so I don not have to worry about thread
safety. I declare my structure globally (in fact a pointer to a
structure), initialize it in PHP_MINIT (it works), then deinitialize in
PHP_MSHUTDOWN (works too). Unfortunetly, when I'm trying to use this
structure in my PHP_FUNCTIONs, it does not work.
What i don't know, if PHP magic does something that prevents using such
globals. Should I use global resources for that instead?
Btw. I'm looking for a good reference of internal PHP APIs. I found
excelent Sara's Golemon articles, but thats all, is there anything better?
--
Semper Fidelis
Adam Klobukowski
[EMAIL PROTECTED]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php