note 83767 added to function.memcache-set

From: Date: Tue, 10 Jun 2008 22:00:07 +0000
Subject: note 83767 added to function.memcache-set
Groups: php.notes 
Request: Send a blank email to php-notes+get-140332@lists.php.net to get a copy of this message
"Other types are stored serialized" isn't true, at least as of PHP 5.2.0 with memcache extension $Revision: 1.85 $. Null is serialized, but for an int, float, or bool, Memcache::set converts the value to a string (actually it tampers with the caller's zval, as if taking it by reference and using settype) and Memcache::get will return a string instead of the original type. Using $memcache->set($key, serialize($var), 1) is a workaround. This undocumented bit in $flag tells Memcache::get to deserialize the value it reads. If this bit is set on a value that can't be deserialized, the server is marked as failed. ---- Server IP: 208.69.120.35 Probable Submitter: 64.124.65.175 ---- Manual Page -- http://www.php.net/manual/en/function.memcache-set.php Edit -- https://master.php.net/note/edit/83767 Del: integrated -- https://master.php.net/note/delete/83767/integrated Del: useless -- https://master.php.net/note/delete/83767/useless Del: bad code -- https://master.php.net/note/delete/83767/bad+code Del: spam -- https://master.php.net/note/delete/83767/spam Del: non-english -- https://master.php.net/note/delete/83767/non-english Del: in docs -- https://master.php.net/note/delete/83767/in+docs Del: other reasons-- https://master.php.net/note/delete/83767 Reject -- https://master.php.net/note/reject/83767 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140332) next »