You are here: Re: Building on classes -- inheritance help needed « PHP Programming Language « IT news, forums, messages
Re: Building on classes -- inheritance help needed

Posted by mountain.dog@gmail.com on 03/21/07 19:43

Thank you Toby. Your brief example helped clarify a lot. I appreciate
your help. One question - what's the difference between these two
instances?
$displayb = new b();
versus
$displayb = new b;
thanks!

On Mar 21, 11:27 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
> 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!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация