3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function get() { throw new Exception('some error'); } } class B { function __toString() { $a = new A; return $a->get(); } } $b = new B; var_dump((string) $b);
based on vtvLW
Output for 7.0.1 - 7.2.0
Fatal error: Method B::__toString() must not throw an exception, caught Exception: some error in /in/od3M7 on line 0
Process exited with code 255.
Output for 5.3.20 - 7.0.0
Fatal error: Method B::__toString() must not throw an exception in /in/od3M7 on line 0
Process exited with code 255.