Posted by Toby A Inkster on 03/21/07 16:27
mountain.dog wrote:
> $display = new a;
> $displayb = new b($a);
> $displayb->someOtherMethod();
You're misunderstanding what inheritance is; so the second line of the
above excerpt doesn't do what you think it does. Replace those three
lines with:
$displayb = new b();
$displayb->someMethod();
$displayb->someOtherMethod();
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
[Back to original message]
|