ID: 26637 User updated by: scott at scottdial dot com Reported By: scott at scottdial dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: N/A PHP Version: Any New Comment:
Doh, I needed to RTFM harder :-p Previous Comments: ------------------------------------------------------------------------ [2003-12-16 01:23:08] scott at scottdial dot com I typo'd.. should be: $bar = unpickle($string); ------------------------------------------------------------------------ [2003-12-16 01:20:34] scott at scottdial dot com Description: ------------ For the unknowing, pickle is the python derived term for object serialization. Currenlty, session management has such functionality, but this functionality is not exposed to the programmer to be done outside of using a session. I propose there be a pickle/unpickle function that uses the same serialization method that the session managment uses. Reproduce code: --------------- $foo = array(1, 2, 3) $string = pickle($foo); echo $string; $bar = unpickle($foo); echo $bar; print_r($bar); Expected result: ---------------- a:3:{i:0;i:1;i:1;i:2;i:2;i:3;} Array Array ( [0] => 1 [1] => 2 [2] => 3 ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26637&edit=1