krakjoe / apcu

APCu - APC User Cache
Other
957 stars 193 forks source link

Store an \SplPriorityQueue #505

Closed soyuka closed 3 months ago

soyuka commented 5 months ago

Is it expected to loose informations about the \SplPriorityQueue? (haven't tried with other SPL classes)

$bar = new \SplPriorityQueue();
$bar->insert('a', 1);
var_dump($bar);
apcu_store('foo', $bar);
var_dump(apcu_fetch('foo'));

20240318_16h49m14s_grim

nikic commented 3 months ago

apcu supports any class that can be serialized, and it looks like SplPriorityQueue currently doesn't support this. I've filed an issue with PHP here: https://github.com/php/php-src/issues/14402