3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $values = array( null, 'sdfas', 1, ); foreach ($values as $value) { var_dump(get_class($value)); }
Output for 7.2.0
Warning: get_class() expects parameter 1 to be object, null given in /in/cug5e on line 10 bool(false) Warning: get_class() expects parameter 1 to be object, string given in /in/cug5e on line 10 bool(false) Warning: get_class() expects parameter 1 to be object, integer given in /in/cug5e on line 10 bool(false)
Output for 5.3.18 - 7.1.10
Warning: get_class() called without object from outside a class in /in/cug5e on line 10 bool(false) Warning: get_class() expects parameter 1 to be object, string given in /in/cug5e on line 10 bool(false) Warning: get_class() expects parameter 1 to be object, integer given in /in/cug5e on line 10 bool(false)