built-in o bjects APC or serial ization
| From: | Andrea Giammarchi | Date: | Wed, 11 Mar 2009 15:48:15 +0000 |
| Subject: | built-in o bjects APC or serial ization | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-289862@lists.php.net to get a copy of this message | ||
Hi everybody,
I am a Certified Zend Engineer with almost 10 years of PHP development
experience but for some reason I've never asked question to this ML.
As subject says, I would like to know if there a generic extension/3rd
parts/solution to save the state of a built-in PHP object.
I perfectly know that __sleep and __wakeup or ... implements
Serializable { ... } could allow me to store and retrieve serialized
data but what I did not expect is that APC just behaves as serialize
and "nothing more" than that.
Here there is a quick explanation:
$xsltp = new XSLTProcessor;
$xsltp->importStylesheet(
DomDocument::load('random.xsl')
);
// no way to store the variable here with its live state
// without re-importing stylesheet on __wakeup or unserialize
echo $xsltp->transformToXML(
DomDocument::load('random.xml')
);
I agree that this built-in stuff could be consider a weird case but I
cannot believe that with all these new classes there is no solution to
truly hibernate instances state.
As summary, I wonder if any of you knows a solution or, if any, when (and if) are you planning to
add this feature.
Best Regards
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx