Bug #69167 [Opn->Csd]: call_user_func does not support references anymore

From: Date: Tue, 03 Mar 2015 10:18:24 +0000
Subject: Bug #69167 [Opn->Csd]: call_user_func does not support references anymore
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191078@lists.php.net to get a copy of this message
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)

« previous php.bugs (#191078) next »