Do you know why does the PHP serialize() function suck with new lines (\n
)? I can’t get it. When i add to the database, it does not count them as characters, but when fetch it and try to unserialize() them, it reports error because of the wrong character count.
So i always have to edit the codes manually so that i rise the character counts in the serialized strings by the number of new lines. It’s not so much trouble, for shorter serializations i do it manually, for longer ones i use strlen(), which strangely counts linebreak characters as a character. Strange, isn’t it?