diff --git a/language/oop5/magic.xml b/language/oop5/magic.xml index 2d601de420..82c528a0ee 100644 --- a/language/oop5/magic.xml +++ b/language/oop5/magic.xml @@ -114,7 +114,10 @@ class Connection <literal>__toString</literal> The __toString method allows a class to decide - how it will react when it is converted to a string. + how it will react when it is treated like a string. For example, + what echo $obj; will print. This method must + return a string, as otherwise a fatal E_RECOVERABLE_ERROR + level error is emitted. Simple example