#26637 [NEW]: pickle/unpickle

2003-12-15 Thread scott at scottdial dot com
From: scott at scottdial dot com
Operating system: N/A
PHP version:  4.3.4
PHP Bug Type: Feature/Change Request
Bug description:  pickle/unpickle

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 bug report at http://bugs.php.net/?id=26637edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26637r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26637r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=26637r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=26637r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26637r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=26637r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=26637r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=26637r=support
Expected behavior:  http://bugs.php.net/fix.php?id=26637r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=26637r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=26637r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=26637r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26637r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=26637r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=26637r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=26637r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26637r=float


#26637 [Opn]: pickle/unpickle function

2003-12-15 Thread scott at scottdial dot com
 ID:   26637
 User updated by:  scott at scottdial dot com
-Summary:  pickle/unpickle
 Reported By:  scott at scottdial dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: N/A
-PHP Version:  4.3.4
+PHP Version:  Any
 New Comment:

I typo'd.. should be: $bar = unpickle($string);


Previous Comments:


[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=26637edit=1


#26637 [Opn-Bgs]: pickle/unpickle function

2003-12-15 Thread scott at scottdial dot com
 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=26637edit=1