Re: "::" meaning and documentation
| From: | Stefan Livieratos | Date: | Mon, 26 Jun 2000 16:07:51 +0000 |
| Subject: | Re: "::" meaning and documentation | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-22360@lists.php.net to get a copy of this message | ||
-----Ursprüngliche Nachricht-----
Von: Ulf Wendel <ulf@redsys.de>
An: <php-dev@lists.php.net>
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