Re: Re: problem with a global variable as class reference

From: Date: Sat, 15 Sep 2001 14:11:47 +0000
Subject: Re: Re: problem with a global variable as class reference
References: 1 2  Groups: php.general php.pear.general 
Request: Send a blank email to php-general+get-67448@lists.php.net to get a copy of this message
> My answer may be not well thought but ... from my knowledge, > problems with php-gtk you can't assign references to global vars > because this particaular declared global variable is a local > reference to the global var. as you say, i guess the "local reference to the global var" is the problem at least i also forgot to define the "${$classNameY}" as global if i do so then the following happens (see comments in code) class temp {   function temp()   {     global $curClass,${"y"};     $curClass = &${"y"}; # this doenst work     $curClass = ${"y"}; # this works, but it's not a reference :-(   } } ------------- $curClass = &${"x"}; $tempi = new temp(); Wolfram Kriesing

« previous php.general (#67448) next »