public static function toString($obj)
    {
        return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_hash($obj);
    }
public static function toString($obj)
    {
        return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_hash($obj);
    }
public static function toString ( $ obj ) { return method_exists ( $ obj , '__toString' ) ? ( string ) $ obj : get_class ( $ obj ) . '@' . spl_object_hash ( $ obj ) ; }
Returns a string representation of an object.

@param object $obj

@return string
Returns a string representation of an object .