3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public static $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 Da2pg
Output for 7.0.0 - 7.3.0rc6
Notice: Accessing static property Foo::$bar as non static in /in/rBS9q on line 4 Notice: Undefined property: Foo::$bar in /in/rBS9q on line 4
Output for 5.3.19 - 5.6.28
Strict Standards: Accessing static property Foo::$bar as non static in /in/rBS9q on line 4 Notice: Undefined property: Foo::$bar in /in/rBS9q on line 4