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);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
154.1 ms | 2150 KiB | 10 Q