3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test { var $foo = 1; function method() { return $this->foo; } } echo Test::method();
Output for 7.0.0 - 7.1.0
Deprecated: Non-static method Test::method() should not be called statically in /in/1gl0v on line 13 Fatal error: Uncaught Error: Using $this when not in object context in /in/1gl0v:9 Stack trace: #0 /in/1gl0v(13): Test::method() #1 {main} thrown in /in/1gl0v on line 9
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: $this is null in /in/1gl0v on line 9
Process exited with code 255.
Output for 5.1.3 - 5.6.28
Strict Standards: Non-static method Test::method() should not be called statically in /in/1gl0v on line 13 Fatal error: Using $this when not in object context in /in/1gl0v on line 9
Process exited with code 255.
Output for 5.0.0 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/1gl0v on line 5 Strict Standards: Non-static method Test::method() should not be called statically in /in/1gl0v on line 13 Fatal error: Using $this when not in object context in /in/1gl0v on line 9
Process exited with code 255.
Output for 4.3.0 - 4.4.9
Notice: Undefined variable: this in /in/1gl0v on line 9