In PHP, should a method named "toString" always return a regular string or can it return a different type of object?

In PHP, the `__toString` magic method should always return a regular string. It is used to define how an object should be represented as a string when it is used in a string context. Returning a different type of object would go against the purpose of this method and could lead to unexpected behavior in your code.

class MyClass {
    public function __toString() {
        return 'This is a string representation of MyClass';
    }
}

$obj = new MyClass();
echo $obj; // Output: This is a string representation of MyClass