We have came across a strange issue while using PHP serialize/unserialize. We have serialized and stored in a particular string in mysql (UTF-8 collation). When unserializing the same it returns error.
Eg: String:
"Anoop did a great job cutting out pictures from the magazine that started with the letter P. "
Serialized data in DB :
s:96:"Anoop did a great job cutting out pictures from the magazine that started with the letter P. ";
While unserializing we got this error Notice - unserialize (): Error at offset 2 of 101 bytes
. We noticed that the string length is different. What would be the cause for this issue.
Any help would be really appreciated. Thanks!