3v4l.org

run code in 300+ PHP versions simultaneously
<?php $function = function (int &$foo) {}; $foo = 1; $args = [&$foo]; unset($foo); $args = [...$args]; # OK // $function(...$args); // if it is uncommented, then code below will not throw warnings # WARNING (new ReflectionFunction($function))->invokeArgs($args); # WARNING call_user_func_array($function, $args);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: {closure}(): Argument #1 ($foo) must be passed by reference, value given in /in/34QmH on line 15 Warning: {closure}(): Argument #1 ($foo) must be passed by reference, value given in /in/34QmH on line 18

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:
50.15 ms | 1531 KiB | 4 Q