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"); echo Foo::bar; // foreach($arr as $val){ var_dump($val); }
based on W9aRL
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Undefined class constant 'bar' in /in/YeU6g:6 Stack trace: #0 {main} thrown in /in/YeU6g on line 6
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Undefined class constant 'bar' in /in/YeU6g on line 6
Process exited with code 255.