php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #26637 pickle/unpickle function
Submitted: 2003-12-16 01:20 UTC Modified: 2003-12-16 01:26 UTC
From: scott at scottdial dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: Any OS: N/A
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: scott at scottdial dot com
New email:
PHP Version: OS:

 

 [2003-12-16 01:20 UTC] 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 )



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-16 01:23 UTC] scott at scottdial dot com
I typo'd.. should be: $bar = unpickle($string);
 [2003-12-16 01:26 UTC] scott at scottdial dot com
Doh, I needed to RTFM harder :-p
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 18:01:29 2024 UTC