How can i serialize objects with fields that contain utf8 strings? Now i get back false after unserialize.
+1
A:
PHP doesn't care what values strings contain when you use serialize/unserialize. Can you provide a code example to demonstrate this problem
Has the class definition been included at the point when you try to unserialize?
Mark Baker
2010-06-21 14:47:26
Then it was a problem when I wanted to save one attribute of an object, that contains htmlsource, but when I not wrote into the __sleep function is worked.but when I wrote into the __sleep function is not worked.I do not know why!
turbod
2010-06-21 15:33:55
Please provide code example... you should only need to use the __sleep() method if you're only serializing some attributes of the object, or have additional processing requirements on serialize
Mark Baker
2010-06-21 15:46:54
If you only want to serialize one attribute, then why not simply serialize that one attribute rather than the whole object?
Mark Baker
2010-06-21 15:56:08