3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function DoFoo() { print("[" . get_called_class() . "]"); } } class Bar { function DoBar() { Foo::DoFoo(); } } // Called by direct static call. Foo::DoFoo(); // Called by indirect static call, without an object context. Bar::DoBar(); // Called by indirect static call, from within an (unrelated) object context. // (But still, ultimately, a static call). $Bar = new Bar(); $Bar->DoBar();
Output for rfc.property-hooks, git.master, git.master_jit
Fatal error: Uncaught Error: Non-static method Foo::DoFoo() cannot be called statically in /in/HXq2f:19 Stack trace: #0 {main} thrown in /in/HXq2f 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:
56.72 ms | 2801 KiB | 4 Q