Re: [PHP-DEV] "::" meaning and documentation From: Stefan Livieratos (stefan <email protected>)
Date: 06/26/00

-----Ursprüngliche Nachricht-----
Von: Ulf Wendel <ulf <email protected>>
An: <php-dev <email protected>>
Gesendet: Montag, 26. Juni 2000 17:44
Betreff: [PHP-DEV] "::" meaning and documentation

> Hi,
>
> what's the meaning of "::"? I was surprised to see that this code works:
>
> <?php
> class foo {
>
> var $bar = 0;
>
> function do() {
> $this->bar = 8;
> print $this->bar;
> }
>
> }
>
> foo::do();
> ?>
>
> Does it officially introduce static method calls or is this a side
> effect?

No side effect. Static method calls were introduced so that in a subclass
you
can call methods of the parent class.

> If so, I would like to see some documentation on it

How about helping write it? :)

> and how can
> a static class use the pseudo object $this to access it's properties
> (but not it's methods)?

If you mean whether you can access class variables using the '::' notation,
it isn't possible.

Regards,
Stefan

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>