Re: Activation of IGBinary serialization extension in 5.4 by default

From: Date: Fri, 19 Aug 2011 11:24:19 +0000
Subject: Re: Activation of IGBinary serialization extension in 5.4 by default
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-54718@lists.php.net to get a copy of this message
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

« previous php.internals (#54718) next »