@ 2015-12-20T13:50:08Z <?php
class Foo {
function __toString() {
throw new \Exception('My err mes');
}
}
$d = new Foo();
(string) $d;
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 Fatal error: Uncaught Exception: My err mes in /in/JvgvTh:5
Stack trace:
#0 /in/JvgvTh(10): Foo->__toString()
#1 {main}
thrown in /in/JvgvTh on line 5
Process exited with code 255 . Output for 7.0.1 - 7.0.20 , 7.1.0 - 7.1.20 , 7.2.0 - 7.2.33 , 7.3.16 - 7.3.33 Fatal error: Method Foo::__toString() must not throw an exception, caught Exception: My err mes in /in/JvgvTh on line 0
Process exited with code 255 . Output for 5.5.24 - 5.5.35 , 5.6.8 - 5.6.28 , 7.0.0 Fatal error: Method Foo::__toString() must not throw an exception in /in/JvgvTh on line 0
Process exited with code 255 . preferences:dark mode live preview
131.91 ms | 402 KiB | 183 Q