Re: PHP 5.2: Serialization patch

From: Date: Wed, 06 Dec 2006 17:41:12 +0000
Subject: Re: PHP 5.2: Serialization patch
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-26823@lists.php.net to get a copy of this message
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


« previous php.internals (#26823) next »