i have this code
class Hide {
private $myname;
function getmyname()
{
$myname = __class__;
return $myname;
}
}
class damu {
private static $name;
public function name()
{
var_dump($this->name);
if( $this->name == null ){
$this->name = new Hide();
}
return $this->name;
}
}
$run = new damu();
echo $run->name();
this giving me an error
Catchable fatal error: Object of class Hide could not be converted to string
what is the meaning of this and how to resolve this.