Re: Call an overridden method in parent class
| From: | Alain Williams | Date: | Wed, 04 Jun 2014 22:25:57 +0000 |
| Subject: | Re: Call an overridden method in parent class | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323389@lists.php.net to get a copy of this message | ||
On Wed, Jun 04, 2014 at 02:45:03PM -0700, David Harkness wrote:
> On Wed, Jun 4, 2014 at 1:21 PM, Alain Williams <addw@phcomp.co.uk> wrote:
>
> > Summary: How to call an overridden non static method in the parent class ?
> >
> > Calling an overridden static method is easy, just go: parent::MethodName().
>
>
> You use the same construct. The code you posted works fine. Try putting in
> some values for those properties to make it more explicit, but here's the
> output:
Drat! Why did that not work when I tried it in my more complex code ... tinker &
it now works.
Thanks, sorry for bothering.
> Array
> (
> [a] =>
> )
> Array
> (
> [a] =>
> [b] =>
> )
>
> Cheers!
> David
--
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256 http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>