Class User{

private $name,$firstname,$town,$phone,$sex,$hobbies,$avatar,$login,$password,$rank,$state,$fax,$cellphone,$mail;
private $private = array('private','rank','avatar');

    function __call($m,$p) {
            $v = strtolower(substr($m,3));
            if (!strncasecmp($m,'get',3) && !in_array($v,$this->private))return $this->$v;
            if (!strncasecmp($m,'set',3) && !in_array($v,$this->private)) $this->$v = $p[0];
    }
}