ID: 50612
Updated by: [email protected]
Reported By: gnujava at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux 64bit
PHP Version: 5.3.1
New Comment:
Please report this at the pecl site, pecl.php.net. Thank you.
Previous Comments:
------------------------------------------------------------------------
[2009-12-30 12:33:02] gnujava at gmail dot com
Description:
------------
Memcached::setMulti can't support pure digit key
file: php_memcached.c
fun: php_memc_setMulti_impl
line: 1009
if (zend_hash_get_current_key_ex(Z_ARRVAL_P(entries), &str_key,
&str_key_len, &num_key, 0, NULL) != HASH_KEY_IS_STRING) {
continue;
}
HASH_KEY_IS_STRING is not good ideal.
Reproduce code:
---------------
---
>From manual page: memcached.setmulti#Description
---
$m = new Memcached();
$m->addServer('localhost', 11211);
$items = array(
'123' => 'value1' // key is pure number but that type is
string, and php engine will turn string(123) to int(123) key.
);
$m->setMulti($items);
var_dump($m->get('123')); // '123'=>'value1' not in memcached
Expected result:
----------------
string(6) "value1"
Actual result:
--------------
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50612&edit=1