Re: [RFC][VOTE] User defined session serializer

From: Date: Mon, 05 Dec 2016 07:00:09 +0000
Subject: Re: [RFC][VOTE] User defined session serializer
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-97282@lists.php.net to get a copy of this message
On Mon, Dec 5, 2016 at 12:31 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > The RFC allows to save session data in whatever format. e.g. > XML/JSON/BSON/etc. This is _impossible_ by save handler submodule. I've never tried, but it would be possible technically. The code wouldn't be clean code, though. With this RFC, JSON session serializer could be session_set_serializer( function ($input_array) { return json_encode($input_array); }, function ($input_string) { return json_decode($input_string); } ); // User may use "interface" alternatively. -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#97282) next »