- error_reporting: documentation ( source)
<?php
error_reporting(E_ALL);
class a {
private $cache = 5;
public function getCache()
{
return $this->cache;
}
}
class b extends a {
private $cache;
public function setCache($value)
{
$this->cache = $value;
}
}
$d = new b();
$d->setCache(2);
echo $d->getCache();