Date: 06/26/00
- Next message: Stanislav Malyshev: "Re: [PHP-DEV] "::" meaning and documentation"
- Previous message: administrateur: "[PHP-DEV] RC1 and MSSQL close"
- In reply to: Chuck Hagenbuch: "Re: [PHP-DEV] "::" meaning and documentation"
- Next in thread: Ulf Wendel: "Re: [PHP-DEV] "::" meaning and documentation"
- Reply: Ulf Wendel: "Re: [PHP-DEV] "::" meaning and documentation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-----Ursprüngliche Nachricht-----
Von: Chuck Hagenbuch <chagenbu <email protected>>
An: Stefan Livieratos <stefan <email protected>>
Cc: Ulf Wendel <ulf <email protected>>; <php-dev <email protected>>
Gesendet: Montag, 26. Juni 2000 18:25
Betreff: Re: [PHP-DEV] "::" meaning and documentation
> Quoting Stefan Livieratos <stefan <email protected>>:
>
> > No side effect. Static method calls were introduced so that in a
subclass
> > you can call methods of the parent class.
>
> If $this is empty in methods called with the :: notation, then how can you
> usefully call a method of the parent class? Or is $this magically set to
the
> right thing in those cases?
>
$this is not empty when calling a static method from within a class:
--cut--
class foo {
var $a = "A";
function doit() {
print $this->a;
}
}
class bar extends foo {
function doit() {
foo::doit();
print "OK";
}
}
$b = new bar;
$b->doit();
--cut--
prints AOK.
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>
- Next message: Stanislav Malyshev: "Re: [PHP-DEV] "::" meaning and documentation"
- Previous message: administrateur: "[PHP-DEV] RC1 and MSSQL close"
- In reply to: Chuck Hagenbuch: "Re: [PHP-DEV] "::" meaning and documentation"
- Next in thread: Ulf Wendel: "Re: [PHP-DEV] "::" meaning and documentation"
- Reply: Ulf Wendel: "Re: [PHP-DEV] "::" meaning and documentation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

