Problem with references
| From: | Terry | Date: | Thu, 04 Dec 2003 11:16:10 +0000 |
| Subject: | Problem with references | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-171798@lists.php.net to get a copy of this message | ||
I wonder if there is a simple techique to help me here. I wish to return 2
references to objects from a function.
The following code describes what I want to do but obviously will not work
(and I understand why):
function Test (&$P1, &$P2)
{
$Object = new Thing();
$P1 =& $Object;
$P2 =& $Object->Property;
}
More generally is there a technique I can use for setting a referenced
variable to be a reference?
Thanks.
Terry