|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-21 14:05 UTC] jmat at shutdown dot net
[2004-07-22 02:45 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 07:00:01 2025 UTC |
Description: ------------ when setting a memcache value, and you specify an expiration time, the module appears to "double" serialize the value, so when you retrieve it later, it's still in a serialized string format. Reproduce code: --------------- <?php $memc = memcache_pconnect("localhost",11211); $values = array(1,2,3,4,5,6,7,8,9); echo "Values: \n"; print_r($values); echo "\n------------------------------\n"; $memc->set("myVals",$values,100); $newValues = $memc->get("myVals"); echo"New Values:\n"; print_r($newValues); echo "\n"; ?> Expected result: ---------------- Values: Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 ) ------------------------------ New Values: Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 ) Actual result: -------------- Values: Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 ) ------------------------------ New Values: a:9:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;i:9;}