Re: PHP 5.2: Serialization patch
| From: | Thomas Seifert | Date: | Thu, 07 Dec 2006 10:25:25 +0000 |
| Subject: | Re: PHP 5.2: Serialization patch | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-26826@lists.php.net to get a copy of this message | ||
From a users point of view: you must be kidding, eh?
You want to break all the strings which were stored serialized in the
5.x-series? I can understand that it will break in php6 but not in some
minor release.
It will cause havoc with a lot of apps which can't read their cached- /
meta-data anymore.
Also the performance drawback will get you a lot of angry users.
Wasn't that just some versions before when the serialization has gotten
a lot slower and created lots of problems?
thomas
Andrei Zmievski schrieb:
> I don't see a way we can make it work for all the cases. I guess we'll
> have to leave this task to PHP_Compat.
>
> -Andrei
>
> On Dec 1, 2006, at 3:03 PM, Ilia Alshanetsky wrote:
>
>> As it stands the current code breaks BC on decoding when the
>> serialized string contains \ characters.
>>
>> For example:
>>
>> Input PHP 5.2 PHP 5.2 w/patch
>> -------------------------------------------------------------------------------------------
>>
>> s:7:"foo\10b"; foo\10b error (NULL
>> returned)
>> s:7:"foo\bar"; foo\bar error (NULL
>> returned)
>> s:5:"\\\\\"; \\\\\ error (NULL
>> returned)
>>
>> Basically any operation involving strings with \ in them, stop working
>> once the patch is applied.
>>
>> There is also the performance drawback to consider, which based on a
>> rudimentary test involving $_SERVER serialization, shows that the new
>> code is roughly 1/2 slower.
>>
>> 5.2: 0.388
>> 5.2 w/patch: 0.652
>>
>> Ilia