Re: Activation of IGBinary serialization extension in 5.4 by default

From: Date: Thu, 18 Aug 2011 13:33:32 +0000
Subject: Re: Activation of IGBinary serialization extension in 5.4 by default
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-54687@lists.php.net to get a copy of this message
2011/8/18 Johannes Schlüter <johannes@schlueters.de>: > On Thu, 2011-08-18 at 12:48 +0100, Paul Dragoonis wrote: >> I agree with bundling and providing a .ini setting to activate, but off by >> default. > > An ini setting is evil for this. People use serialized data as transport > format having that depend on an ini setting is bad. > we already do this (session.serialize_handler, defaults to our own format, but can be set to wddx or igbinary) the userland session handler should be handler agnostic, it shouldn't really break the application if the serialization format change, as the handler should know or care whats inside the $data as long as it can be passed around. but imo this sucks. your handler cannot look into the data, the only available methods for packing and unpacking the session data can only used to read and write the $_SESSION superglobal, so for example if you to load another session for some reason, you have to save the value of the $_SESSION, empty $_SESSION, load the encoded session, call session_decode, fetch the $_SESSION then restore it from your copy. and I really hate that the php session format is almost compatible with serialize/unserialize. if I remember correctly only lacks the a:number_of_items_in_the_session:{} around the session data. why did we did this? to save a few bytes? /o\ sorry for the rant. -- Ferenc Kovács @Tyr43l - http://tyrael.hu

« previous php.internals (#54687) next »