Re: Inheritance of class methods
| From: | Jochem Maas | Date: | Thu, 23 Oct 2008 11:38:21 +0000 |
| Subject: | Re: Inheritance of class methods | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-282345@lists.php.net to get a copy of this message | ||
Alain Roger schreef:
> Hi,
>
> i have the following classes:
> class A
> {
> public function EchoMe($txt)
> {
> echo $txt;
> }
> }
>
> class B extends A
> {
> ...
> }
>
> in theory i can write something like that:
>
> $b = new B();
> $b->EchoMe("test");
>
> and i should get echo "test" on screen.
> am i correct ?
with regard to theory, here's one of mine:
in the time you wrote the email you could have run the code and
found out for yourself.
enjoy.
>