Re: [PHP4BETA] OOP issue
| From: | Kristian Köhntopp | Date: | Tue, 16 Nov 1999 08:17:21 +0000 |
| Subject: | Re: [PHP4BETA] OOP issue | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-6284@lists.php.net to get a copy of this message | ||
Andi Gutmans wrote:
> In PHP 4 if the child doesn't define a constructor it's supposed to
> inherit the parents constructor. Only if you override the constructor do
> you need to call the parent constructor explicitly.
Did I understand this correctly: When I define a class Y extends X without
providing Y::y() and X::x() is a constructor in X, a $y = new Y does
call Y::x()?
Ok, that works and it is probably the most confusing way to implement it.
Kristian
--
Kristian Köhntopp, NetUSE Kommunikationstechnologie GmbH
Siemenswall, D-24107 Kiel, Germany, +49 431 386 436 00
Using PHP3? See our web development library at
http://phplib.netuse.de/ (We have moved! Update your
bookmarks!)