|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-12-08 16:52 UTC] wedgedkc at hotmail dot com
[2009-12-10 06:20 UTC] wedgedkc at hotmail dot com
[2009-12-10 06:22 UTC] wedgedkc at hotmail dot com
[2009-12-13 11:55 UTC] tricky dot pecl at luuseri dot com
[2009-12-13 14:36 UTC] tricky dot pecl at luuseri dot com
[2009-12-13 18:55 UTC] jmy at morgontech dot com
[2009-12-14 17:50 UTC] wedgedkc at hotmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
Description: ------------ When switch on BINARY_PROTOCOL we see strange things while using values got from getMulti method. Look at the end of the output - we get NULL instead off the "value0". If the BINARY_PROTOCOL is turned off everything works fine. Values: array(2) { ["key_0"]=> string(6) "value0" ["key_0_additional"]=> string(17) "value0_additional" } key_0: string(6) "value0" Values: array(2) { ["key_0_additional"]=> string(17) "value0_additional" ["key_0"]=> string(6) "value0" } key_0: NULL Reproduce code: --------------- $cache = new Memcached(); $cache->setOption(Memcached::OPT_BINARY_PROTOCOL, true); $cache->addServers( array( array('localhost', 11211) ) ); $cache->set( 'key_0', 'value0' ); $cache->set( 'key_0_additional', 'value0_additional' ); // -------------- NORMAL $keys = array( 'key_0', 'key_0_additional' ); $values = $cache->getMulti( $keys ); echo "Values:<br>\n"; var_dump( $values ); echo "<br>\n"; echo "key_0:<br>\n"; var_dump( $values['key_0'] ); echo "<br>\n"; // --------------- REVERSED KEY ORDER $keys = array( 'key_0_additional', 'key_0' ); $values = $cache->getMulti( $keys ); echo "Values:<br>\n"; var_dump( $values ); echo "<br>\n"; echo "key_0:<br>\n"; var_dump( $values['key_0'] ); echo "<br>\n"; Expected result: ---------------- key_0: string(6) "value0" Actual result: -------------- key_0: NULL