3v4l.org

run code in 300+ PHP versions simultaneously
<?php class c { /** * @param integer $i * @return mixed */ public function test($i) { $test2 = function($x) use(&$test2) { if ($x < 10) { $test2(); $this->test($i); } }; $test2($i); return $i++; } } $t = new c(); $t->test(1);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: Too few arguments to function c::{closure}(), 0 passed in /in/4IMRv on line 11 and exactly 1 expected in /in/4IMRv:9 Stack trace: #0 /in/4IMRv(11): c->{closure}() #1 /in/4IMRv(15): c->{closure}(1) #2 /in/4IMRv(21): c->test(1) #3 {main} thrown in /in/4IMRv 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:
37.9 ms | 401 KiB | 8 Q