mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
01453a0af7
Even though the input is not a reference (or not treated as such), we still need to create a reference to satisfy the function signature. Various code relies on reference arguments actually being references. In this particular case, it would result in a JIT crash. The zend_call_function() implementation already handled this correctly.
12 lines
292 B
PHP
12 lines
292 B
PHP
--TEST--
|
|
Argument name for Closure::__invoke via call_user_func reference warning
|
|
--FILE--
|
|
<?php
|
|
|
|
$test = function(&$arg) {};
|
|
call_user_func([$test, '__invoke'], null);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Closure::__invoke(): Argument #1 ($arg) must be passed by reference, value given in %s on line %d
|