#39216 [Opn->Asn]: call_user_func and friends don't accept array($this, "func") callback anymore

From: Date: Fri, 20 Oct 2006 17:01:28 +0000
Subject: #39216 [Opn->Asn]: call_user_func and friends don't accept array($this, "func") callback anymore
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-103810@lists.php.net to get a copy of this message
ID: 39216 Updated by: bjori@php.net Reported By: hannes dot magnusson at gmail dot com -Status: Open +Status: Assigned Bug Type: *Programming Data Structures Operating System: FreeBSD PHP Version: 6CVS-2006-10-20 (CVS) -Assigned To: +Assigned To: pollita Previous Comments: ------------------------------------------------------------------------ [2006-10-20 17:00:35] hannes dot magnusson at gmail dot com Description: ------------ call_user_func()/array_walk() doesn't accept array($obj, "func") callback anymore... (See Zend/tests/bug31720.phpt && Zend/tests/bug19859.phpt) Reproduce code: --------------- <?php $array = array('at least one element'); array_walk($array, array($nonesuchvar,'show')); ?> Expected result: ---------------- Notice: Undefined variable: nonesuchvar in %s on line %d Notice: Non-callable array passed to zend_call_function() in %s on line %d Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d Actual result: -------------- Notice: Undefined variable: nonesuchvar in /usr/src/php/6.0/Zend/tests/bug31720.php on line 4 Warning: array_walk() expects parameter 2 to be valid callback, array given in /usr/src/php/6.0/Zend/tests/bug31720.php on line 4 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39216&edit=1

« previous php.bugs (#103810) next »