3v4l.org

run code in 300+ PHP versions simultaneously
<?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();
Output for git.master, git.master_jit, rfc.property-hooks
Here's your static method: Foo!<br /> static_method_caller says: Here's your static method: Foo!<br /> Fatal error: Uncaught Error: Non-static method Test::non_static() cannot be called statically in /in/56kWU:19 Stack trace: #0 {main} thrown in /in/56kWU on line 19
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
102.46 ms | 401 KiB | 8 Q