--TEST-- APC: apcu_store/fetch with objects --SKIPIF-- = 8.1"); ?> --INI-- apc.enabled=1 apc.enable_cli=1 --FILE-- a = true; var_dump($bar); #[AllowDynamicProperties] class bar extends foo { public $pub = 'bar'; protected $pro = 'bar'; private $pri = 'bar'; // we don't see this, we'd need php 5.1 new serialization function __construct() { $this->bar = true; } function change() { $this->pri = 'mod'; } } class baz extends bar { private $pri = 'baz'; function __construct() { parent::__construct(); $this->baz = true; } } $baz = new baz; var_dump($baz); $baz->change(); var_dump($baz); apcu_store('baz', $baz); unset($baz); var_dump(apcu_fetch('baz')); ?> ===DONE=== --EXPECTF-- object(foo)#%d (0) { } object(foo)#%d (0) { } object(foo)#%d (1) { ["a"]=> bool(true) } object(baz)#%d (6) { ["pub"]=> string(3) "bar" ["pro":protected]=> string(3) "bar" ["pri":"bar":private]=> string(3) "bar" ["pri":"baz":private]=> string(3) "baz" ["bar"]=> bool(true) ["baz"]=> bool(true) } object(baz)#%d (6) { ["pub"]=> string(3) "bar" ["pro":protected]=> string(3) "bar" ["pri":"bar":private]=> string(3) "mod" ["pri":"baz":private]=> string(3) "baz" ["bar"]=> bool(true) ["baz"]=> bool(true) } object(baz)#%d (6) { ["pub"]=> string(3) "bar" ["pro":protected]=> string(3) "bar" ["pri":"bar":private]=> string(3) "mod" ["pri":"baz":private]=> string(3) "baz" ["bar"]=> bool(true) ["baz"]=> bool(true) } ===DONE===