3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Insu { function clsName() { echo get_class($this); } } $cl = new Insu; $cl->clsName(); Insu::clsName();
Output for 7.1.0
Insu Deprecated: Non-static method Insu::clsName() should not be called statically in /in/BMYMb on line 12 Fatal error: Uncaught Error: Using $this when not in object context in /in/BMYMb:7 Stack trace: #0 /in/BMYMb(12): Insu::clsName() #1 {main} thrown in /in/BMYMb on line 7
Process exited with code 255.
Output for 7.0.0 - 7.0.14
Insu Deprecated: Non-static method Insu::clsName() should not be called statically in /in/BMYMb on line 12 Notice: Undefined variable: this in /in/BMYMb on line 7 Insu
Output for hhvm-3.10.0 - 3.12.0
Insu Notice: Undefined variable: this in /in/BMYMb on line 7 Insu
Output for 5.3.1 - 5.6.28
Insu Strict Standards: Non-static method Insu::clsName() should not be called statically in /in/BMYMb on line 12 Notice: Undefined variable: this in /in/BMYMb on line 7 Insu
Output for 5.3.0
Insu Strict Standards: Non-static method Insu::clsName() should not be called statically in /in/BMYMb on line 12 Notice: Undefined variable: this in /in/BMYMb on line 7 Warning: get_class() expects parameter 1 to be object, null given in /in/BMYMb on line 7
Output for 5.0.4 - 5.2.17
Insu Strict Standards: Non-static method Insu::clsName() should not be called statically in /in/BMYMb on line 12 Notice: Undefined variable: this in /in/BMYMb on line 7
Output for 5.0.0 - 5.0.3
Insu Strict Standards: Non-static method Insu::clsName() should not be called statically in /in/BMYMb on line 12 Notice: Undefined variable: this in /in/BMYMb on line 7
Output for 4.3.0 - 4.4.9
insu Notice: Undefined variable: this in /in/BMYMb on line 7