You return a Hide instance and try to echo it. Since your implementation does not have a __toString() method, there is no string representation, and you will get this error. Try the following:
$run = new damu(); echo $run->name()->getmyname();
or add the __toString() method to Hide .
source share