3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(unserialize(serialize(new ErrorException("foo bar"))));
Output for 5.3.0 - 5.4.43, 5.5.24 - 5.5.27, 5.6.8 - 5.6.11, 7.0.14 - 7.1.0
object(ErrorException)#1 (8) { ["message":protected]=> string(7) "foo bar" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/cagFU" ["line":protected]=> int(3) ["trace":"Exception":private]=> array(0) { } ["previous":"Exception":private]=> NULL ["severity":protected]=> int(1) }
Output for 5.4.44 - 5.4.45, 5.5.28 - 5.5.35, 5.6.12 - 5.6.21, 7.0.0 - 7.0.6
object(ErrorException)#1 (7) { ["message":protected]=> string(7) "foo bar" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/cagFU" ["line":protected]=> int(3) ["trace":"Exception":private]=> array(0) { } ["severity":protected]=> int(1) }
Output for hhvm-3.12.0
object(ErrorException)#1 (8) { ["severity":protected]=> int(0) ["message":protected]=> string(7) "foo bar" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/cagFU" ["line":protected]=> int(3) ["trace":"Exception":private]=> array(0) { } ["previous":"Exception":private]=> NULL }
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.1.0 - 5.2.17
object(ErrorException)#1 (7) { ["message:protected"]=> string(7) "foo bar" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/cagFU" ["line:protected"]=> int(3) ["trace:private"]=> array(0) { } ["severity:protected"]=> int(1) }
Output for 5.0.0 - 5.0.5
Fatal error: Class 'ErrorException' not found in /in/cagFU on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: errorexception in /in/cagFU on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: errorexception in /in/cagFU on line 3