note 33082 added to ref.com

From: Date: Mon, 16 Jun 2003 11:07:50 +0000
Subject: note 33082 added to ref.com
Groups: php.notes 
Request: Send a blank email to php-notes+get-50415@lists.php.net to get a copy of this message
Passing parameters by reference in PHP 4.3.2 (and in a future releases of PHP ) In PHP 4.3.2 allow_call_time_pass_reference option is set to "Off" by default and future versions may not support this option any longer. Some COM functions has by-reference parameters. VARIANT object must be used to call this functions, but it would be passed without an '&' before variable name. Example: $myStringVariant = new VARIANT("over-write me", VT_BSTR); /* works */ $result = $comobj->DoSomethingTo($myStringVariant ); /* works only with allow_call_time_pass_reference option set to "On" and may not work in a future release of PHP */ $result = $comobj->DoSomethingTo(&$myStringVariant ); The value in the variant can be retrieved by: $theActualValue = $myStringVariant->value; ---- Manual Page -- http://www.php.net/manual/en/ref.com.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33082 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33082&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33082&report=yes

« previous php.notes (#50415) next »