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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
