Re: Re: $this->value VS $value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just for closure: so many year believing that $value and $this->value
was the same!!!

Tks everyone for the quick answer :)

Ângelo

2008/9/23 Colin Guthrie <gmane@xxxxxxxxxxxxxx>:
> Nathan Rixham wrote:
>>
>> yeah that's right; add in one more line and the reason why is apparent..
>
> Well I think "is apparent" is a bit strong considering e.g. C++ syntax where
> syntax is equally valid but the semantics are different.
>
> So to answer the OPs question, yes this is different in PHP compared to
> other languages. I think this is due to the fact that classes are kinda
> bolted on in PHP and there isn't really such a thing as "being in a class"
> in terms of scoping. $this is allows the class scope to be kind of emulated
> inside a functional scope.
>
> I could be wrong here, but that's my understanding of it.
>
> Col
>
> --
>
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
>
> Day Job:
>  Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
>  Mandriva Linux Contributor [http://www.mandriva.com/]
>  PulseAudio Hacker [http://www.pulseaudio.org/]
>  Trac Hacker [http://trac.edgewall.org/]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux