3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php print((new Exception("foo")) ->__toString());
based on VRT3E
Output for 7.0.0 - 7.2.0
Exception: foo in /in/SfWTr:3 Stack trace: #0 {main}
Output for 5.4.11 - 5.6.28
exception 'Exception' with message 'foo' in /in/SfWTr:3 Stack trace: #0 {main}
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/SfWTr on line 3
Process exited with code 255.