3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { function bar() { echo isset($this) ? 'Instance' : 'Class', "\n"; } } class Baz { function test() { Foo::bar(); } } // Take care: $baz = new Baz; $baz->test();
Output for 7.0.0 - 7.1.0
Deprecated: Non-static method Foo::bar() should not be called statically in /in/ceuu9 on line 15 Class
Output for 5.6.0 - 5.6.28
Deprecated: Non-static method Foo::bar() should not be called statically, assuming $this from incompatible context in /in/ceuu9 on line 15 Instance
Output for 5.1.3 - 5.5.37
Strict Standards: Non-static method Foo::bar() should not be called statically, assuming $this from incompatible context in /in/ceuu9 on line 15 Instance
Output for 4.3.0 - 5.1.2
Instance