note 49497 added to function.call-user-func

From: Date: Sun, 30 Jan 2005 09:29:10 +0000
Subject: note 49497 added to function.call-user-func
Groups: php.notes 
Request: Send a blank email to php-notes+get-84196@lists.php.net to get a copy of this message
For that example above saying that "the parameters for call_user_func() are not passed by reference": <?php function increment(&$var) { $var++; } $a = 0; call_user_func('increment', $a); echo $a; // 0 . . . well, you can use call_user_func('increment',&$a); and this will pass the parameter by reference? I dont know why this isnt indicated in the example? ---- Manual Page -- http://www.php.net/manual/en/function.call-user-func.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49497 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49497&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49497&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49497&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49497&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49497&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49497&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84196) next »