krakjoe/apcu

`apcu_fetch` returns `success` for missing keys

boesing opened this issue · 2 comments

Hey there,

I am using APCu on PHP 8.1 with v5.1.23.
When I execute apcu_fetch with a key which does not exist, $success flag is being set to true and false is returned.

$value = apcu_fetch(bin2hex(random_bytes(10)), $success);
var_dump($value, $success);
bool(false)
bool(true)

Do I miss something? AFAIR apcu_fetch returned false on success when cache key did not exist?

I can't reproduce this. For me this prints false two times.

Maybe this is related to MacOS and/or patches of shivammathur. Will double check that. Sorry for creating noise.