itn make to string php method code example Example 1: integer to string php return strval($integer); Example 2: php object to string __toString() & {$this->name}