3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { static function static_method() { echo "Here's your static method: Foo!<br />\n"; } function static_method_caller() { echo "static_method_caller says: ";$this->static_method(); } function non_static() { echo "I am not a static method<br />\n"; } } $t = new Test(); $t->static_method(); $t->static_method_caller(); Test::non_static();
based on v9Y4G
Output for 7.0.0 - 7.1.7, 7.2.0
Here's your static method: Foo!<br /> static_method_caller says: Here's your static method: Foo!<br /> Deprecated: Non-static method Test::non_static() should not be called statically in /in/56kWU on line 19 I am not a static method<br />
Output for 7.1.10

Process exited with code 137.
Output for 5.3.19 - 5.6.28
Here's your static method: Foo!<br /> static_method_caller says: Here's your static method: Foo!<br /> Strict Standards: Non-static method Test::non_static() should not be called statically in /in/56kWU on line 19 I am not a static method<br />