3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function f() { echo get_class($this); } } A::f(); ?>
Output for 7.1.0 - 7.2.0
Deprecated: Non-static method A::f() should not be called statically in /in/kntAV on line 6 Fatal error: Uncaught Error: Using $this when not in object context in /in/kntAV:3 Stack trace: #0 /in/kntAV(6): A::f() #1 {main} thrown in /in/kntAV on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Deprecated: Non-static method A::f() should not be called statically in /in/kntAV on line 6 Notice: Undefined variable: this in /in/kntAV on line 3 A
Output for 5.3.19 - 5.6.28
Strict Standards: Non-static method A::f() should not be called statically in /in/kntAV on line 6 Notice: Undefined variable: this in /in/kntAV on line 3 A