Bug #69167 [Opn->Csd]: call_user_func does not support references anymore
Edit report at https://bugs.php.net/bug.php?id=69167&edit=1
ID: 69167
Updated by: laruence@php.net
Reported by: cweiske@php.net
Summary: call_user_func does not support references anymore
-Status: Open
+Status: Closed
Type: Bug
Package: Unknown/Other Function
PHP Version: master-Git-2015-03-03 (Git)
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7ad6711a4dcb092e2125d36ec623f38a22153e73
Log: Fixed bug #69167 (call_user_func does not support references anymore)
Previous Comments:
------------------------------------------------------------------------
[2015-03-03 07:54:56] cweiske@php.net
Description:
------------
Passing a string or array reference to call_user_func gives an array in PHP 7, while it works fine
in PHP 4 and PHP 5.
See http://3v4l.org/D9PjW#vphp7@20150101
Test script:
---------------
<?php
function l($m) {
echo $m . "\n";
}
$cb = 'l';
call_user_func($cb, 'hi');
$cb2 = &$cb;
call_user_func($cb2, 'hi2');
?>
Expected result:
----------------
hi
hi2
Actual result:
--------------
hi
Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in
/in/D9PjW on line 10
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69167&edit=1
Thread (2 messages)