php-src/Zend/tests/call_user_func_009.phpt
Nikita Popov bd893061d6 Use SEND_USER for CONST|TMP as well
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().
2016-09-25 12:39:23 +02:00

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)