Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54718 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50386 invoked from network); 19 Aug 2011 11:24:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2011 11:24:55 -0000 Authentication-Results: pb1.pair.com header.from=neufeind@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=neufeind@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 91.184.32.3 as permitted sender) X-PHP-List-Original-Sender: neufeind@php.net X-Host-Fingerprint: 91.184.32.3 mail.speedpartner.de Linux 2.5 (sometimes 2.4) (4) Received: from [91.184.32.3] ([91.184.32.3:54269] helo=mail.speedpartner.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/C7-11562-6084E4E4 for ; Fri, 19 Aug 2011 07:24:55 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.speedpartner.de (Postfix) with ESMTP id 8C82CB3DA3 for ; Fri, 19 Aug 2011 13:24:51 +0200 (CEST) Received: from mail.speedpartner.de ([127.0.0.1]) by localhost (mail.speedpartner.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EpiOwlhpBjdP for ; Fri, 19 Aug 2011 13:24:51 +0200 (CEST) Received: from collab.speedpartner.de (collab.speedpartner.de [91.184.32.10]) by mail.speedpartner.de (Postfix) with ESMTP id 76E56B3D9F for ; Fri, 19 Aug 2011 13:24:51 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by collab.speedpartner.de (Postfix) with ESMTP id EBECE12F0003 for ; Fri, 19 Aug 2011 13:24:49 +0200 (CEST) X-Virus-Scanned: amavisd-new at collab.speedpartner.de Received: from collab.speedpartner.de ([127.0.0.1]) by localhost (collab.speedpartner.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oQdz6YmLDA-V for ; Fri, 19 Aug 2011 13:24:49 +0200 (CEST) Received: from [192.168.1.160] (dslb-084-062-068-236.pools.arcor-ip.net [84.62.68.236]) by collab.speedpartner.de (Postfix) with ESMTPSA id 83D9512F0002 for ; Fri, 19 Aug 2011 13:24:49 +0200 (CEST) Message-ID: <4E4E47E3.4010602@php.net> Date: Fri, 19 Aug 2011 13:24:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 MIME-Version: 1.0 To: internals@lists.php.net References: <4E4D4B8D.6090406@sugarcrm.com> <4E4E1561.8070305@kingsquare.nl> <006f01cc5e61$49b72600$dd257200$@com> In-Reply-To: <006f01cc5e61$49b72600$dd257200$@com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Activation of IGBinary serialization extension in 5.4 by default From: neufeind@php.net (Stefan Neufeind) On 08/19/2011 01:15 PM, Jonathan Bond-Caron wrote: > On Fri Aug 19 03:48 AM, Kingsquare.nl - Robin Speekenbrink wrote: >> >> Also the proposed include it -> read the data -> convert on write if >> in previous format (possibly an ini setting?) would provide full BC >> and would allow a painless upgrade... wouldnt it? >> > > 100% against enabling it by default. > > - still a BC break since some apps in the wild assume serialize($foo) is ascii text (whether that's good or bad). > - the default serialize() is readable, easy to debug, doesn't assume you can read binary. PHP is also about simplicity not performance. > - igbinary_serialize_double() is not cross-platform so serializing/unserializing a 'float' won't always work > http://www.dmh2000.com/cpp/dswap.shtml (2. use a 'union' type to overlay a byte array on top of the data) > > My preference would be to have: > > serialize_text() -- ascii text only (standard/var.c) but remove 'NULL' byte (working on a patch for this) > serialize_binary() -- igbinary bundled into core... > > serialize() -- based on php.ini setting, serialize_text by default In general fine with me. But why not just give it a second (optional) parameter? Regards, Stefan