3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { throw new Error("Some error message", 30); } catch(Error $e) { echo "The Error code is: " . $e->getCode(); }
Output for 7.0.0 - 7.2.0
The Error code is: 30
Output for 5.3.21 - 5.6.28
Fatal error: Class 'Error' not found in /in/a8QmQ on line 4
Process exited with code 255.