note 90894 added to function.call-user-func-array

From: Date: Fri, 15 May 2009 01:30:33 +0000
Subject: note 90894 added to function.call-user-func-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-154619@lists.php.net to get a copy of this message
RE: Freek (at) Gruntjes.net (message below) use this instead (&$var and not just $var) : <?php call_user_func_array('refFunc', array(&$var)); ?> That way, the $var reference is added to the array, and refFunc() will work correctly. Your example will then output "foobar" as expected. ---- Server IP: 195.207.10.20 Probable Submitter: 91.177.155.85 ---- Manual Page -- http://www.php.net/manual/en/function.call-user-func-array.php Edit -- https://master.php.net/note/edit/90894 Del: integrated -- https://master.php.net/note/delete/90894/integrated Del: useless -- https://master.php.net/note/delete/90894/useless Del: bad code -- https://master.php.net/note/delete/90894/bad+code Del: spam -- https://master.php.net/note/delete/90894/spam Del: non-english -- https://master.php.net/note/delete/90894/non-english Del: in docs -- https://master.php.net/note/delete/90894/in+docs Del: other reasons-- https://master.php.net/note/delete/90894 Reject -- https://master.php.net/note/reject/90894 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#154619) next »