3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function hello(){ echo "Hello World\n"; } } $x = 'hello'; $y[0] = 'hello'; A::$x(); A::$y[0]();
based on Kou29
Output for 7.0.0 - 7.2.0
Deprecated: Non-static method A::hello() should not be called statically in /in/qhLst on line 10 Hello World Fatal error: Uncaught Error: Access to undeclared static property: A::$y in /in/qhLst:11 Stack trace: #0 {main} thrown in /in/qhLst on line 11
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Strict Standards: Non-static method A::hello() should not be called statically in /in/qhLst on line 10 Hello World Strict Standards: Non-static method A::hello() should not be called statically in /in/qhLst on line 11 Hello World