<?php
class Test {
protected $a;
public function __construct($a) {
$this->a=$a;
}
public function print_a() {
echo $this->a."\n";
}
};
class ExtendedTest extends Test {
public function print_a() {
echo "extended {$this->a}";
}
};
$test=new Test("hallo");
$test->print_a();
$extendedTest=new ExtendedTest("hallo");
$extendedTest->print_a();
apc_store("test",$test);
$test_s=apc_fetch("test");
$test_s->print_a();
hallo
extended hallo
Fatal error: Uncaught Error: Call to undefined function apc_store() in /in/DISbN:27
Stack trace:
#0 {main}
thrown in /in/DISbN on line 27
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
hallo
extended hallo
Fatal error: Call to undefined function apc_store() in /in/DISbN on line 27
Process exited with code 255.