mirror of
https://github.com/php/php-src.git
synced 2024-12-21 16:00:18 +08:00
bd893061d6
Otherwise we're missing the "expected to be a reference, value given" warning that appears for ordinary calls to call_user_func(). Also update an UPGRADING note with recent changes wrt call_user_func().
18 lines
403 B
PHP
18 lines
403 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: Parameter 1 to sort() expected to be a reference, value given in %s on line %d
|
|
bool(true)
|
|
|
|
Warning: Parameter 1 to sort() expected to be a reference, value given in %s on line %d
|
|
bool(true)
|