container[$var])) return $this->container[$var]; return false; } function __set($var, $value) { $this->container[$var]=$value; } } $a=new dummy; $a->vars='directly'; echo $a->vars;//direcly //---------------------------------------- //failed $a->a['failed']='failed'; echo $a->a['failed'];//return null //---------------------------------------- //Works! $a->witharray=array(); $a->witharray['test']='hello'; echo $a->witharray['test'];//hello ?>