Re: PHP 5.2: Serialization patch

From: Date: Fri, 01 Dec 2006 23:03:07 +0000
Subject: Re: PHP 5.2: Serialization patch
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-26760@lists.php.net to get a copy of this message
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 (#26760) next »