RE: [PECL-DEV] Static array & PHP CLI

From: Date: Mon, 25 Jun 2012 17:42:10 +0000
Subject: RE: [PECL-DEV] Static array & PHP CLI
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-9544@lists.php.net to get a copy of this message
Persistent arrays can be used in any PHP mode: CLI, CGI, apache module, ZTS active or not. But, do you really understand what CLI mode implies ? I don't understand your architecture. Do you understand that persistence is between requests ? If you use a mode like CLI which handles a single request before shutting down the process, I don't see very well what persistence will bring. The same in CGI mode. In these two modes, a different process is created for each request and there is no persistence possible between processes, at least not the basic memory persistence provided by the Zend library. For examples using persistent arrays, you can have a look at the code of the automap (http://pecl.php.net/package/automap) and phk (http://pecl.php.net/package/phk) extensions. Start with automap, which is a cache system using persistent arrays. François

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