[thelist] [php] Object Serialization

Tobyn Baugher toby at rsux.com
Fri Feb 28 15:39:00 CST 2003


On Friday, February 28, 2003 10:02 AM -0800 Kelly Hallman
<khallman at wrack.org> wrote:

> How robust is PHP's serialize() function?  Does anyone have any
> experiences serializing complex objects, shelving them to a database
> and then unserializing them later?

Never stored the serialized data in a database, but I've never had any
trouble storing it in a file. It's worked just fine with everything
I've thrown at it. Just don't try to serialize resources (file handles,
DB connections) and you should be just fine. Make sure you escape the
data before storing it in a database with addslashes() or whatever your
database library provides.

Regards,

Toby

--
Tobyn Baugher <toby at rsux.com>
http://www.rsux.com
aim: dieplzkthxbye  icq: 14281524  efnet: toby



More information about the thelist mailing list