note 97453 deleted from function.call-user-func-array by danbrown

From: Date: Tue, 20 Apr 2010 16:30:28 +0000
Subject: note 97453 deleted from function.call-user-func-array by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-168457@lists.php.net to get a copy of this message
Note Submitter: dczech (at) gmail (dot) com ---- response to Freek (at) Gruntjes.net If you want references to work you must pass variables in array as reference <?php function refFunc(&$var) { $var .= 'bar'; } $var = 'foo'; call_user_func_array('refFunc', array(&$var)); echo $var; ?> This script outputs 'foobar' as expected.

« previous php.notes (#168457) next »