On Sun, 2003-02-23 at 18:04, michel 'ziobudda' morelli wrote:
> Il dom, 2003-02-23 alle 17:32, Marcus B�rger ha scritto:
> > You can do the following:
> > class base {
> > function __construct() {
> > echo "base::__construct()\n";
> > }
> [...]
>
> I know know.
>
> What I want to understand is why the base::__construct() is called (in
> automatic) only when derived::__constuct() is missing.
Because (from a user's point of view) the constructor is inherited just
like any other function.
> I think that or the base::__construct() is always in automatic called or
> it is always never called (in automatic).
Well, because there might be situations in which I'd like to call the
parent's constructor before my code in __construct, sometimes after it
and in some situations, not call it at all.
- Timm
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php