Store complete php object in mysql, mongo, or other database
<p>I need to be able to temporarily store a complete PHP object (containing some data and methods) somewhere... we use MySQL already but I'm open to other solutions if they work better.</p>

<p>Essentially, I can't use serialize because we lose the methods and I'd rather not save the data, and then create a new instance of the object every time I want to use it.</p>

<p>What's the best way for storing a complete php object for later use (needs to be saved to memory, using session not ok if user disconnects).</p>
