diff --git a/language/oop5/magic.xml b/language/oop5/magic.xml index a01452cf53..00f85b9f9b 100644 --- a/language/oop5/magic.xml +++ b/language/oop5/magic.xml @@ -136,6 +136,13 @@ class Connection return a string, as otherwise a fatal E_RECOVERABLE_ERROR level error is emitted. + + + You cannot throw an exception from within a + __toString() method. Doing so will + result in a fatal error. + + Simple example