3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public $bar; } $foo = new Foo; $arr = array("", " ", FALSE, TRUE, array(), NULL, "0", 0, 0.0, new stdClass, $foo, $foo->bar, "\0"); $headings = array('type', 'if', 'isset', 'empty', 'is_null'); foreach($heading as $heading){ echo pad_str($heading, 20), " | "; } echo "\n"; /* foreach($arr as $val){ echo gettype($val), " | "; } */
based on rBS9q
Output for 5.3.19 - 7.2.0
Notice: Undefined variable: heading in /in/XQpbq on line 7 Warning: Invalid argument supplied for foreach() in /in/XQpbq on line 7