3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function foo() { echo 'foo'; } } class B extends A {} function invoke(callable $callable) { $callable(); } $b = new B(); call_user_func([$b, 'parent::foo']); invoke([$b, 'parent::foo']);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Callables of the form ["B", "parent::foo"] are deprecated in /in/FhnmQ on line 14 foo Deprecated: Callables of the form ["B", "parent::foo"] are deprecated in /in/FhnmQ on line 8 Fatal error: Uncaught Error: Call to undefined method B::parent::foo() in /in/FhnmQ:9 Stack trace: #0 /in/FhnmQ(16): invoke(Array) #1 {main} thrown in /in/FhnmQ on line 9
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:
43.36 ms | 1564 KiB | 4 Q