mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
1e9a5c67ef
This is targeting 8.0. `$arg` seems like a poor choice of a name, especially if the function were to have arguments added. In many cases, the php.net documentation already has $array for these functions. E.g. https://www.php.net/manual/en/function.array-intersect.php I'd assume that since named arguments was added to 8.0 near the feature freeze, PHP's maintainers had planned to make the names consistent and gradually use the same name for docs and implementation.
18 lines
419 B
PHP
18 lines
419 B
PHP
--TEST--
|
|
call_user_func() behavior when passing literal to reference parameter
|
|
--FILE--
|
|
<?php
|
|
|
|
namespace Foo;
|
|
|
|
var_dump(call_user_func('sort', []));
|
|
var_dump(\call_user_func('sort', []));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: sort(): Argument #1 ($array) must be passed by reference, value given in %s on line %d
|
|
bool(true)
|
|
|
|
Warning: sort(): Argument #1 ($array) must be passed by reference, value given in %s on line %d
|
|
bool(true)
|