3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(class_exists('Error')); var_dump(!is_subclass_of('Error', 'Exception')); var_dump(new \Error());
based on vWbVX
Output for 7.0.0 - 7.2.0
bool(true) bool(true) object(Error)#1 (7) { ["message":protected]=> string(0) "" ["string":"Error":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/bGn4L" ["line":protected]=> int(5) ["trace":"Error":private]=> array(0) { } ["previous":"Error":private]=> NULL }
Output for 5.3.19 - 5.6.28
bool(false) bool(true) Fatal error: Class 'Error' not found in /in/bGn4L on line 5
Process exited with code 255.