&$varname menas to take the address of the variable,

example:

$a = "Hello world!";
$b = &$a;
$b = "Hi! this is var B";
echo $a;

// output will be: Hi! this is var B

"Ming-Chieh Lee" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> does anyone know what does &$this mean?  I saw this on the php.net
tuturial
> for references inside a constructor.
> I thought that $this is already a reference?
> The way it was used :
> class Foo
> {
>     function Foo($name)
>     {
>         // create a reference inside the global array $globalref
>         global $globalref;
>         $globalref[] = &$this;
>         // set name to passed value
>         $this->setName($name);
>         // and put it out
>         $this->echoName();
>     }
> thanks for any input!
>
>
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to