function __construct(){
unset($this->var);
}
function __get($elmname){
echo "call __get\n";
return $this->$elmname;
}
}
class Ex2{
function __construct(){
}
function __get($elmname){
echo "call __get\n";
return $this->$elmname;
}
}
$ex1=new Ex1();
echo $ex1->var;
$ex2=new Ex2();
echo $ex2->var;