php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #42725 Functions to serialize/unserialize session data
Submitted: 2007-09-21 12:04 UTC Modified: 2007-09-21 12:21 UTC
From: jani dot ollikainen at pronetko dot fi Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.4 OS:
Private report: No CVE-ID:
 [2007-09-21 12:04 UTC] jani dot ollikainen at pronetko dot fi
Description:
------------
PHP has to have functions to serialize/unserialize session data,
but those functions aren't available to use.

There is one unserialize function in comment's of unserialize
but i would like to see those two functions in php itself.


Reproduce code:
---------------
And BTW the function is by eoin at joy dot ucc dot ie:
<?php
function unserialize_session_data( $serialized_string ) {
    $variables = array(  );
    $a = preg_split( "/(\w+)\|/", $serialized_string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
    for( $i = 0; $i < count( $a ); $i = $i+2 ) {
        $variables[$a[$i]] = unserialize( $a[$i+1] );
    }
    return( $variables );
}

Expected result:
----------------
I would like to see those functions

Actual result:
--------------
Didn't find them.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 19:01:51 2014 UTC