3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); class Foo { function bar() { var_dump($this); } } Foo::bar();
based on m6CPu
Output for 7.1.0
Deprecated: Non-static method Foo::bar() should not be called statically in /in/GCATp on line 10 Fatal error: Uncaught Error: Using $this when not in object context in /in/GCATp:6 Stack trace: #0 /in/GCATp(10): Foo::bar() #1 {main} thrown in /in/GCATp on line 6
Process exited with code 255.
Output for 7.0.0 - 7.0.14
Deprecated: Non-static method Foo::bar() should not be called statically in /in/GCATp on line 10 Notice: Undefined variable: this in /in/GCATp on line 6 NULL
Output for 5.4.0 - 5.6.28
Strict Standards: Non-static method Foo::bar() should not be called statically in /in/GCATp on line 10 Notice: Undefined variable: this in /in/GCATp on line 6 NULL
Output for 5.0.4 - 5.3.29
Notice: Undefined variable: this in /in/GCATp on line 6 NULL
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: this in /in/GCATp on line 6 NULL