3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public $a; public function __call($method, $args) { call_user_func_array([$this->a, $method], $args); } public function foo() { print 123; } } $a = new test(); $b = new test(); $b->a = $a; $b->foo(); $b->bar();
Output for git.master, git.master_jit, rfc.property-hooks
123 Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object in /in/5TTaS:7 Stack trace: #0 /in/5TTaS(7): test->__call('bar', Array) #1 /in/5TTaS(19): test->__call('bar', Array) #2 {main} thrown in /in/5TTaS on line 7
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:
42.88 ms | 401 KiB | 8 Q