3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class F { function __toString() { throw new exception(); } } try { (string)(new F); } catch (ICatchable $e) { var_dump($e);}
based on kuLmD
Output for 7.0.1 - 7.2.0
Fatal error: Method F::__toString() must not throw an exception, caught Exception: in /in/24oll 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 F::__toString() must not throw an exception in /in/24oll on line 0
Process exited with code 255.
Output for 5.4.2 - 5.4.7
Fatal error: Method F::__toString() must not throw an exception in /in/24oll on line 10
Process exited with code 255.