I have memcache(installed on php5) and memcached(installed on php7.2 via libmemcached) that connect to the same memcached daemon/server.
Memcache::getworks fine and receives data in line with my expectation. But when I do Memcached::get, it always returns 0.
I checked that I have compression when using both extensions. I also tried to switch between Memcached::OPT_BINARY_PROTOCOLfor memcachedand it still produces the same zero result.
Interestingly, when I add a key / value pair using the extension memcachedand retrieve using the same key, I get the correct / correct value that I added.
Now I do not know what might be the reason that it does not work for data already stored on the memcached server.
EDIT 1 . I made telnet for my memcached server and verified that this value is actually. In addition, I checked the result code returned Memcached::getResultCodeis not a failure.
EDIT 2 : I may have narrowed it down further. I noticed that when I save ["key1" => "value1"]from a memcache-php5script, it saves and retrieves the data correctly. But when I try to get the same data using a memcached-php7.1script, it returns 0.
"key1" memcached telnet. ["key1" => "value1"], memcached-php7.1 script, . memcache-php5 script "a:1:{s:4:\"key1\";s:6:\"value1\";}" ( json_encoded)
, , / memcached memcached.
P.S.: php. , .