Edit report at http://bugs.php.net/bug.php?id=49622&edit=1
ID: 49622 Comment by: lealcy at gmail dot com Reported by: giunta dot gaetano at gmail dot com Summary: allow usage of json and/or php standard serialize format for sessions Status: Open Type: Feature/Change Request Package: Session related Operating System: * PHP Version: 5.3.0 Block user comment: N Private report: N New Comment: Just add a second parameter to the existing function: $overwrite_session = true. This avoid create a extra function and doesn't break any existing code. Previous Comments: ------------------------------------------------------------------------ [2009-09-22 12:14:10] giunta dot gaetano at gmail dot com Description: ------------ The current session_decode() function is good when the user needs to decode a serialized session string, but it - needs to have session_start() called beforehand - has an impact on the current session state A lot of comments in the php man pages for unserialize() and session_decode() are from users trying to write a preg_ based decoder of session data (and failing). A new function that session_decode_to_array() that - returned the deserialized data as an array - did not impact current session state would imho be quite useful (or adding a flag param to the existing function, to the same effect) Since this feat. request has already been filed and closed as bogus (http://bugs.php.net/bug.php?id=42725), what I am proposing here is slightly different: besides 'wddx' and 'php', allow usage of 'json' and 'serialize' as native serialization formats for session data - the latter corresponding to the native serialize function. If there is some information loss involved in using those two formats (ie. references), just make it clear in the docs. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=49622&edit=1