3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { function a(){ var_dump($this); } } A::a();
Output for 7.0.0 - 7.1.0
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/dZBuN on line 2 Fatal error: Uncaught Error: Non-static method A::a() cannot be called statically in /in/dZBuN:7 Stack trace: #0 {main} thrown in /in/dZBuN on line 7
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: this in /in/dZBuN on line 4 NULL
Output for 5.0.0 - 5.6.28
Fatal error: Non-static method A::a() cannot be called statically in /in/dZBuN on line 7
Process exited with code 255.
Output for 4.3.0 - 4.4.9
Notice: Undefined variable: this in /in/dZBuN on line 4 NULL