PHP 8.5.0 Alpha 4 available for testing

Voting

: min(seven, two)?
(Example: nine)

The Note You're Voting On

miha at hribar dot info
16 years ago
This method also returns false in case you set the value to false, so in order to have a proper fault mechanism in place you need to check the result code to be certain that a key really does not exist in memcached.

<?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
?>

Or just make sure the values are not false :)

<< Back to user notes page

To Top