#42725 [Opn->Bgs]: Functions to serialize/unserialize session data
ID: 42725
Updated by: derick@php.net
Reported By: jani dot ollikainen at pronetko dot fi
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
PHP Version: 5.2.4
New Comment:
http://php.net/serialize
http://php.net/unserialize
Previous Comments:
------------------------------------------------------------------------
[2007-09-21 12:04:13] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42725&edit=1
Thread (2 messages)