ConFoo Montreal 2026: Call for Papers

Voting

: four plus three?
(Example: nine)

The Note You're Voting On

miha at hribar dot info
16 years ago
The method correctly returns false if you set the value to false. This means that in order to have proper fault checking mechanism in place you need to check the result code.

<?php
$Memcached
= new Memcached();
$Memcached->addServer('localhost', 11211);
$Memcached->set('key', false);
var_dump($Memcached->get('key')); // boolean false
var_dump($Memcached->getResultCode()); // int 0 which is Memcached::RES_SUCCESS
?>

<< Back to user notes page

To Top