<?php
$a = array(1,2,3);
apc_store('my_array', $a, 5);
$a = 0;
echo "<pre>"; var_dump($a); echo "</pre>";
$b = apc_fetch('my_array');
echo "<pre>"; var_dump($b); echo "</pre>";
?>
int(0)
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }
<?php
if(!apc_load_constants('my_constants')) {
$constants = array('ABC'=>'testing',
'DEF'=>123,
'FOO'=>'Bar');
apc_define_constants('my_constants', $constants);
}
?>