note 64380 added to language.references.pass

From: Date: Thu, 13 Apr 2006 05:42:53 +0000
Subject: note 64380 added to language.references.pass
Groups: php.notes 
Request: Send a blank email to php-notes+get-107957@lists.php.net to get a copy of this message
There's a problem (at least in PHP 5) regarding passing parameters by reference to functions. If you use call_user_func() to call a function, for instance MyFunction(&$Parameter), that defines that a parameter is passed by reference, the parameter will NOT be passed by reference just because it is defined that way in the function declaration. To get around this, just make sure to pass the parameter by reference in call_user_func(), such as call_user_func("MyFunction", &$Parameter). ---- Server IP: 203.202.10.60 Probable Submitter: 64.131.168.131 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/language.references.pass.php Edit -- http://master.php.net/note/edit/64380 Del: integrated -- http://master.php.net/note/delete/64380/integrated Del: useless -- http://master.php.net/note/delete/64380/useless Del: bad code -- http://master.php.net/note/delete/64380/bad+code Del: spam -- http://master.php.net/note/delete/64380/spam Del: non-english -- http://master.php.net/note/delete/64380/non-english Del: in docs -- http://master.php.net/note/delete/64380/in+docs Del: other reasons-- http://master.php.net/note/delete/64380 Reject -- http://master.php.net/note/reject/64380 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107957) next »