3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { static function bar() { echo isset($this) ? 'Instance' : 'Class', "\n"; } } // OK: Foo::bar(); class Baz extends Foo { function test() { Foo::bar(); $this->bar(); } } // Take care: $baz = new Baz; $baz->test();
based on sZNYh
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
Class Class Class