Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26842 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15691 invoked by uid 1010); 7 Dec 2006 18:01:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 15676 invoked from network); 7 Dec 2006 18:01:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Dec 2006 18:01:48 -0000 Authentication-Results: pb1.pair.com header.from=chad@herballure.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=chad@herballure.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain herballure.com from 64.202.189.91 cause and error) X-PHP-List-Original-Sender: chad@herballure.com X-Host-Fingerprint: 64.202.189.91 k2smtpout02-02.prod.mesa1.secureserver.net Linux 2.4/2.6 Received: from [64.202.189.91] ([64.202.189.91:55897] helo=k2smtpout02-02.prod.mesa1.secureserver.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F4/16-13900-9E658754 for ; Thu, 07 Dec 2006 13:01:48 -0500 Received: (qmail 1315 invoked from network); 7 Dec 2006 18:01:10 -0000 Received: from unknown (HELO secureservicesonline.com) (68.178.174.117) by k2smtpout02-02.prod.mesa1.secureserver.net (64.202.189.91) with ESMTP; 07 Dec 2006 18:01:10 -0000 Received: from localhost (rtdns.com [127.0.0.1]) by secureservicesonline.com (Postfix) with ESMTP id 006A86D02EB for ; Thu, 7 Dec 2006 13:01:09 -0500 (EST) Received: from secureservicesonline.com ([127.0.0.1]) by localhost (mail.rtdns.com [127.0.0.1]) (amavisd-new, port 20024) with ESMTP id 29029-12 for ; Thu, 7 Dec 2006 13:01:09 -0500 (EST) Received: from [192.168.0.51] (cpe-69-205-153-76.stny.res.rr.com [69.205.153.76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by secureservicesonline.com (Postfix) with ESMTP id 23F036D01BC for ; Thu, 7 Dec 2006 13:01:08 -0500 (EST) Message-ID: <457856E3.2020607@herballure.com> Date: Thu, 07 Dec 2006 13:01:07 -0500 User-Agent: Thunderbird 1.5.0.8 (X11/20061025) MIME-Version: 1.0 To: internals@lists.php.net References: <0c60b01d19ec7e242ade31e29120ee27@gravitonic.com> <4577FC87.7090109@hardened-php.net> <79.1E.13900.F8038754@pb1.pair.com> <5D89A1AE-2EB0-4977-A7EE-B511A4843D27@prohost.org> <45783A9E.3000804@hardened-php.net> In-Reply-To: <45783A9E.3000804@hardened-php.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at rtdns.com Subject: Re: [PHP-DEV] PHP 5.2: Serialization patch From: chad@herballure.com (Chad Daelhousen) Stefan Esser wrote: >> Well, older version of PHP will be totally incapable of parsing it, >> creating problems for the many people who use serialized strings as a >> means of passing data between PHP applications. This would be an >> especially big problem if you would want to add it to a pre-6.0 release. > Uhmm you are missing the point. The point was that PHP 5.2.x can read > data serialized with PHP 6. PHP 5.2.x only needs to be able to read it. > Generating it is not necessary. > > At the moment it seems that data serialized in PHP 5.2.x is totally > incompatible with PHP 6. As 6.0 is not, to my knowledge, anywhere near release, what about this: 1. Stick a version number on the front of PHP6-serialized strings. BC can't break inside the 6.x family if there's nothing to be compatible with. 2. Don't change serialize() at all in PHP < 6.0.0. No version number, no extra escaping. 3. Add some mechanism to tell PHP6 to generate a PHP5-compatible binary string when serializing. I recommend an optional flag (or flags field) to serialize(). 4. Understand the new version number in PHP 5.2.1+. That would not touch existing serialization format. It would keep existing compatibility among the 4.x and 5.x family, and allow future PHPs to unambiguously determine how to parse the string. With the serialize() flag, you could explicitly generate old-style data from PHP6 if you really, really wanted to pass it back to PHP 5.2.0 or earlier. -- Chad Daelhousen "Television shepherds with living room sheep/ And I pray" --Temple of the Dog, "Wooden Jesus"