|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-12-30 12:48 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 05:00:01 2025 UTC |
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)