Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54723 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60563 invoked from network); 19 Aug 2011 12:04:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2011 12:04:35 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:63724] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/D9-11562-2515E4E4 for ; Fri, 19 Aug 2011 08:04:34 -0400 Received: by gyd5 with SMTP id 5so2529170gyd.29 for ; Fri, 19 Aug 2011 05:04:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=OCMZUWE9CyUETBBqNG8o7xMOs6N02d6wpu2CpbPf5oI=; b=ETvZaw8DjuJvj+Jidf1k3784+GD9MCT3hfH41J/1nL+9FN5a1SbPtjxjg8xQrwF+3v 27nEuie+AfK+uQQe46C2ANxP3d2DS5EvPRmCUCd0r9Hg7YWQBeCJeO0/CEFG+PqGmLoh B4jEydj3XKzrCvKPbCPwv1uM+LgYvwYhuN6x8= MIME-Version: 1.0 Received: by 10.236.187.74 with SMTP id x50mr6832137yhm.76.1313755471926; Fri, 19 Aug 2011 05:04:31 -0700 (PDT) Received: by 10.146.83.5 with HTTP; Fri, 19 Aug 2011 05:04:31 -0700 (PDT) In-Reply-To: References: <4E4E48F6.8010107@php.net> Date: Fri, 19 Aug 2011 14:04:31 +0200 Message-ID: To: Paul Dragoonis Cc: Pierre Joye , Sebastian Bergmann , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Activation of IGBinary serialization extension in 5.4 by default From: tyra3l@gmail.com (Ferenc Kovacs) On Fri, Aug 19, 2011 at 1:42 PM, Paul Dragoonis wrote= : > On Fri, Aug 19, 2011 at 12:36 PM, Pierre Joye wrot= e: > >> On Fri, Aug 19, 2011 at 1:28 PM, Sebastian Bergmann >> wrote: >> > Am 18.08.2011 13:12, schrieb Paul Dragoonis: >> >> Here we get a great perf boost, and what's more excellent as we don't >> have >> >> to break BC to get there! >> > >> > =C2=A0Are you sure it does not break BC? Does http://bit.ly/nIRxqz sti= ll work >> > =C2=A0with IGBinary, for instance? >> >> That obviously won't work as long as igbinary is used. It is covered >> by the =C2=A0"interop" or BC break parts in my initial reply. >> > > So far, it looks like this "transparent" upgrade isn't that transparent > anymore and will result in BC breaks. New approaches must be thought of. > > Like Pierre said, there will be new serialization engines in the future s= o > it makes no sense to add more functions like serialize_binary() or whatno= t. > > I think we need to keep our code base identical and maintain the > serialize_handler via our php.ini configuration. this could still cause problems, as pointed out before (when you change your handler, or when you pass serialized data between different php installs, etc.), so I really like what Kiall Mac Innes suggested: prefix the data with the serializer identifier. if it is missing, then it was serialized with the old method, if it is present, the appropriate method should be used, if the serializer ident is there but unknown, then exit with a fatal error telling the user that the custom handler is missing. the downside would be that if you want to serialize/unserialize the data outside of php, your implementation should take care of this prefix. just a wild idea, but maybe useful: instead of creating a prefix, we could serialize the passed data with the given(php, igbinary, etc.) handler, then wrap the whole stuff into an array which holds the name of the used handler and the serialized data, and serialize this array with the old(php) serialize method. this way the datablob would be always a valid serialized string, and would be easier to get the serialize method than with the prefixing. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu