Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26823 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36812 invoked by uid 1010); 6 Dec 2006 17:41:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 36797 invoked from network); 6 Dec 2006 17:41:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Dec 2006 17:41:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=andrei@gravitonic.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=andrei@gravitonic.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain gravitonic.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: andrei@gravitonic.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from [204.11.219.139] ([204.11.219.139:41994] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/C0-31449-5B007754 for ; Wed, 06 Dec 2006 12:41:44 -0500 Received: from [66.228.175.145] (borndress-lm.corp.yahoo.com [66.228.175.145]) (authenticated bits=0) by lerdorf.com (8.13.8/8.13.8/Debian-2) with ESMTP id kB6Hf69e014423; Wed, 6 Dec 2006 09:41:06 -0800 In-Reply-To: References: <0c60b01d19ec7e242ade31e29120ee27@gravitonic.com> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: Content-Transfer-Encoding: 7bit Cc: php-dev Internals Date: Wed, 6 Dec 2006 09:41:12 -0800 To: Ilia Alshanetsky X-Mailer: Apple Mail (2.624) Subject: Re: [PHP-DEV] PHP 5.2: Serialization patch From: andrei@gravitonic.com (Andrei Zmievski) 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