I agree with you. This is the closest i've been able to get...
class whatever{
private $Properties=array();
function __set($key,$val){
try{
if(!isset($this->Properties[$key])){
$this->Properties[$key]=$val;
}
}catch(Exception $e){
//...
}
}
function __get($key){
try{
if(isset($this->Properties[$key])){
return $this->Properties[$key];
}
}catch(Exception $e){
//...
}
}
}