how to convert an string object to class object in php code example Example: php object to string __toString() & {$this->name}