Well, PHP is a loosely typed language. You have much more freedom when you
write a code. Constructors are not an exception. It is very convinient that
you may not call the parent constructor and many people do it, believe me!
And also the flag for the internal classes that has been discussed is maybe
enough for PHP.

2006/9/15, Terje Slettebø <[EMAIL PROTECTED]>:

>From: "Marcus Boerger" <[EMAIL PROTECTED]>

> PHP is not C++ and speaking of constructors and destrcutors PHP goes
morethe
> Delphi way.

I'd also like to know _why_ constructors/destructors are less fit for PHP,
than these other languages? How can you be sure that objects of a class
are
properly initialised, and that they clean up after themselves? (Yes, I
know
the runtime cleans up after them, at script termination, if want to be
sloppy, but that still doesn't cover the constructor case)

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Reply via email to