Re: How to cache zval * in HashTable?

[email protected] (Johannes Schlüter)
Newsgroups php.pecl.dev
Organization php.net
Message-ID <1281341854.969.29.camel@guybrush>
On Mon, 2010-08-09 at 13:56 +0800, xiangchao liu wrote:
> Hi, everyone,
> 
> I now want to cache zval * in global variable HashTable, so i can retrieve
> it through requests, codes like below:

A zval is allocated in per-request memory so you can't just store it and
retrieve it for the next request. You have to serialize it in some way,
which won't always work (instances of internal classes)

The implementation of apc_store() might show you what is possible.

johannes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.