3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function foo($arg1, $arg2, $arg3) { var_dump($arg1, $arg2); } } class B extends A { public function foo($arg1, $arg2, $arg3) { call_user_func_array(['parent', 'foo'], [3] + [$arg2, $arg1]); } } $b = new B; $b->foo(1, 2, 4);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Use of "parent" in callables is deprecated in /in/agNEM on line 15 Fatal error: Uncaught ArgumentCountError: Too few arguments to function A::foo(), 2 passed in /in/agNEM on line 15 and exactly 3 expected in /in/agNEM:5 Stack trace: #0 /in/agNEM(15): A->foo(3, 1) #1 /in/agNEM(20): B->foo(1, 2, 4) #2 {main} thrown in /in/agNEM on line 5
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:
39.57 ms | 401 KiB | 8 Q