|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-01-16 10:38 UTC] mikael at synd dot info
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Jan 02 02:00:01 2026 UTC |
Description: ------------ On 2.2.x, if you passed an array to get() which contained only unset keys, you would get back an empty array. In 3.0.x, you get boolean FALSE. The manual does not describe this behavior, though it strongly implies that when using multi-get you always get an array back: ?You can pass array of keys to Memcache::get() to get array of values. The _result array_ will contain only found key-value pairs.? (Emphasis mine) This change in semantics isn't documented anywhere, and seems odd. It should either get reverted to the 2.2.x behavior or explicitly documented that multi-gets of unset keys return false. The former would be my preference. Reproduce code: --------------- var_dump($cache->get(array('foo', 'bar'))); Expected result: ---------------- array(0) { } Actual result: -------------- bool(false)