3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo(is_object(5) ? "object\n" : "false\n"); echo(is_object($var) ? "object\n" : "false\n"); echo(is_object(null) ? "object\n" : "false\n"); echo(is_object(new Exception()) ? "object\n" : "false\n"); echo(is_object(array("foo"=>"bar")) ? "object\n" : "false\n"); echo(is_object("pingas") ? "object\n" : "false\n"); echo(is_object("/.*/") ? "object\n" : "false\n"); ?>
based on t9Fo1
Output for 5.0.4 - 5.6.38, hhvm-3.10.1 - 3.21.3, 7.0.0 - 7.2.11
false Notice: Undefined variable: var in /in/HYYvl on line 4 false false object false false false
Output for hhvm-3.22.0
false Notice: Undefined variable: var in /in/HYYvl on line -1 false false object false false false
Output for 5.0.0 - 5.0.3
false Notice: Undefined variable: var in /in/HYYvl on line 4 false false object false false false
Output for 4.3.2 - 4.4.9
false Notice: Undefined variable: var in /in/HYYvl on line 4 false false Fatal error: Cannot instantiate non-existent class: exception in /in/HYYvl on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
false Notice: Undefined variable: var in /in/HYYvl on line 4 false false Fatal error: Cannot instantiate non-existent class: exception in /in/HYYvl on line 6