3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { public function __toString() { throw new Exception('Can\'t make this a string...'); } } echo new Foo;
Output for 7.0.1 - 7.2.0
Fatal error: Method foo::__toString() must not throw an exception, caught Exception: Can't make this a string... in /in/eBJa9 on line 0
Process exited with code 255.
Output for 5.3.18 - 5.3.29, 5.4.8 - 7.0.0
Fatal error: Method foo::__toString() must not throw an exception in /in/eBJa9 on line 0
Process exited with code 255.
Output for 5.4.2 - 5.4.7
Fatal error: Method foo::__toString() must not throw an exception in /in/eBJa9 on line 13
Process exited with code 255.