global variables

From: Date: Sat, 04 Dec 2004 22:01:58 +0000
Subject: global variables
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1694@lists.php.net to get a copy of this message
Hi, I writing an extension for text search tools and I have a little problem with global variables. In each search, I use a binary tree which is always the same. So it's a waste of time to build this tree every time I call my search function. Then I would prefer create this tree just one time, when the extension is loaded (when apache & php start) and always access to this same data. But I can't find how to do this. I try to create a variable just under /* True global resources - no need for thread safety here */ but I assume it's not good because this variable seems to be dependant on each apache process... I'm sure there's a solution because turckmmcache store data in such global variable but I can't really understand how it did it. Thanks a lot -- tristan (who must improve his english)

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