object to string php
snippet in php

object to string php

user1329

(string)$yourObject;

php object to string

user669

__toString() & {$this->name}