note 72248 deleted from function.apc-store by nlopess

From: Date: Tue, 09 Jan 2007 18:37:28 +0000
Subject: note 72248 deleted from function.apc-store by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121497@lists.php.net to get a copy of this message
Note Submitter: jcastromail at yahoo dot es ---- It's not quite true that store only a level. Using 3.0.12p2 with default configuration <?php echo "real :<br>"; $v1_1=array('dog','cat','cow','duck'); // first level $v1_2=array('blue','red','green','yellow'); // first level. $v1=array($v1_1,$v1_2); // second level. $v0=array($v1,$v1,$v1); // third level echo var_dump($v0)."<br>"; echo "cache:<br>"; apc_store('v0', $v0); $v_cache=apc_fetch('v0'); echo var_dump($v_cache); ?> returns : real : array(3) { [0]=> array(2) { [0]=> array(4) { [0]=> string(3) "dog" [1]=> string(3) "cat" [2]=> string(3) "cow" [3]=> string(4) "duck" } [1]=> array(4) { [0]=> string(4) "blue" [1]=> string(3) "red" [2]=> string(5) "green" [3]=> string(6) "yellow" } } [1]=> array(2) { [0]=> array(4) { [0]=> string(3) "dog" [1]=> string(3) "cat" [2]=> string(3) "cow" [3]=> string(4) "duck" } [1]=> array(4) { [0]=> string(4) "blue" [1]=> string(3) "red" [2]=> string(5) "green" [3]=> string(6) "yellow" } } [2]=> array(2) { [0]=> array(4) { [0]=> string(3) "dog" [1]=> string(3) "cat" [2]=> string(3) "cow" [3]=> string(4) "duck" } [1]=> array(4) { [0]=> string(4) "blue" [1]=> string(3) "red" [2]=> string(5) "green" [3]=> string(6) "yellow" } } } cache: array(3) { [0]=> array(2) { [0]=> array(4) { [0]=> string(3) "dog" [1]=> string(3) "cat" [2]=> string(3) "cow" [3]=> string(4) "duck" } [1]=> array(4) { [0]=> string(4) "blue" [1]=> string(3) "red" [2]=> string(5) "green" [3]=> string(6) "yellow" } } [1]=> array(2) { [0]=> array(4) { [0]=> string(3) "dog" [1]=> string(3) "cat" [2]=> string(3) "cow" [3]=> string(4) "duck" } [1]=> array(4) { [0]=> string(4) "blue" [1]=> string(3) "red" [2]=> string(5) "green" [3]=> string(6) "yellow" } } [2]=> array(2) { [0]=> array(4) { [0]=> string(3) "dog" [1]=> string(3) "cat" [2]=> string(3) "cow" [3]=> string(4) "duck" } [1]=> array(4) { [0]=> string(4) "blue" [1]=> string(3) "red" [2]=> string(5) "green" [3]=> string(6) "yellow" } } } as espected.

« previous php.notes (#121497) next »