I am studying the use of APC in PHP. I created this script to check it out:
<?php
require 'Person.php';
if (!$p = apc_fetch('p')) {
$p = new Person('larry');
apc_store('p', $p);
}
echo $p->getName();
where Person.php:
<?php
class Person
{
private $_name;
public function __construct($_name)
{
$this->_name = $_name;
}
public function setName($_name)
{
$this->_name = $_name;
}
public function getName()
{
return $this->_name;
}
}
It works fine, but the stored value in apc:
__PHP_Incomplete_Class::__set_state(array(
'__PHP_Incomplete_Class_Name' => 'Person',
'_name' => 'larry',
))
this is normal? or something is wrong with '__PHP_Incomplete_Class_Name'
thank
source
share