note 90894 deleted from function.call-user-func-array by danbrown
| From: | danbrown@php.net | Date: | Fri, 15 May 2009 02:08:10 +0000 |
| Subject: | note 90894 deleted from function.call-user-func-array by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-154620@lists.php.net to get a copy of this message | ||
Note Submitter: cassis at NOSPAM dot onzeweb dot com
----
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.