3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'holger@hütig.de'; $e = new Exception($str); var_dump($str, $e);
based on EtZMT
Output for 5.3.0 - 7.2.0
string(16) "holger@hütig.de" object(Exception)#1 (7) { ["message":protected]=> string(16) "holger@hütig.de" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/ltW0T" ["line":protected]=> int(5) ["trace":"Exception":private]=> array(0) { } ["previous":"Exception":private]=> NULL }
Output for 5.0.0 - 5.0.2, 5.0.5 - 5.2.17
string(16) "holger@hütig.de" object(Exception)#1 (6) { ["message:protected"]=> string(16) "holger@hütig.de" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/ltW0T" ["line:protected"]=> int(5) ["trace:private"]=> array(0) { } }
Output for 5.0.3 - 5.0.4
string(16) "holger@hütig.de" object(Exception)#1 (6) { ["message:protected"]=> string(16) "holger@hütig.de" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(9) "/in/ltW0T" ["line:protected"]=> int(5) ["trace:private"]=> array(1) { [0]=> array(3) { ["file"]=> string(9) "/in/ltW0T" ["line"]=> int(5) ["function"]=> string(7) "unknown" } } }
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: exception in /in/ltW0T on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: exception in /in/ltW0T on line 5