3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { function bar() { return 2; } } $foo = new Foo; echo $foo->bar . "\n";
Output for 5.2.6 - 7.2.0
Notice: Undefined property: Foo::$bar in /in/6l75H on line 7
Output for 5.0.0 - 5.2.5
Notice: Undefined property: Foo::$bar in /in/6l75H on line 7
Output for 4.3.0 - 4.4.9
Notice: Undefined property: bar in /in/6l75H on line 7