I have a complex object that I create in a PHP script. I am looking for a way to store this object such that subsequent requests do not have to recreate it, or spend time un
Maybe the solution is to not build a single, massive, expensive object.
Given that a PHP application pretty much starts from a clean slate on every page load, a solution that depends on a single, giant object is a poor fit to the language. Since you don't go into much detail about what your object is & what it does, I can't be certain, but I'd suspect you don't really need everything the object does on every page load. If that's the case, you might seriously consider splitting it into a number of smaller, simpler classes that you can instantiate as needed.