Some others systems use something similar to syntax checking (ldap password hashes).
Baisically, prefix a code to the serialized string to indicate what method was used to serialize. Eg no prefix, or $O$ for the old style. Or $I$ for the igbinary syntax. This has the advantage of allowing additional formats to be added over time without breaking BC. Kiall On Aug 18, 2011 12:49 p.m., "Paul Dragoonis" <dragoo...@gmail.com> wrote: > On Thu, Aug 18, 2011 at 12:38 PM, Roger Llopart Pla <lumben...@gmail.com >wrote: > >> I agree with bundling it in the core aswell, but having it as default, as >> stated, would be a huge BC break. >> >> 2011/8/18 Arpad Ray <array...@gmail.com> >> >>> Hi, >>> >>> On Thu, Aug 18, 2011 at 12:12 PM, Paul Dragoonis <dragoo...@gmail.com> >>> wrote: >>> > Hey guys, >>> > >>> > After a brief discussion with Pierre I'm taking this discussion to here. >>> > We have the igbinary pecl extension available [1], however not many of >>> our >>> > userbase are familiar that it even exists. >>> > Here [2] is the performance boost we get from using igbinary with >>> > serialize() and unserialize(). >>> > >>> > Here we get a great perf boost, and what's more excellent as we don't >>> have >>> > to break BC to get there! >>> >>> It would break BC for anyone with serialized strings stored in the >>> current format. >>> >>> Maybe bundle it in core and provide an ini setting like >>> session.serialize_handler, but I don't think making it the default in >>> 5.4 is an option. >>> >> > Sorry guys, I didn't realise there was an actual BC break in the serialized > structure. > I agree with bundling and providing a .ini setting to activate, but off by > default. > > >> >>> Regards, >>> >>> Arpad >>> >>> > >>> > This seems like a no-brainer and a good investment in the speed increase >>> of >>> > PHP by default for the future users of the platform. >>> > >>> > [1] http://pecl.php.net/package/igbinary >>> > [2] http://www.php.net/~pierre/vcqa/apcigninary_perf.png >>> > >>> > Comments please. >>> > >>> > Regards, >>> > Paul Dragoonis. >>> > >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >>