- error_reporting: documentation ( source)
<?php
/**
* test
*/
class Test
{
private $age;
public function __construct()
{
$this->age = 12;
//echo 'construct';
}
private function __set($name,$value)
{
echo 'unknown property?' . $name . '=' . $value . '<hr>';
}
public function __get($name)
{
echo $name . '<hr>';
}
public function say(){
return $this->age;
}
}
error_reporting(E_ALL);
$a = new Test();
$a->name = 'Eddy';
?>