3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Foo\Bar; function t() { throw NAN; } define('Foo\\Bar\\NAN', 'Exception'); t();
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Can only throw objects in /in/Ya52d:8 Stack trace: #0 /in/Ya52d(11): Foo\Bar\t() #1 {main} thrown in /in/Ya52d on line 8
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Fatal error: Can only throw objects in /in/Ya52d on line 8
Process exited with code 255.