Re: php5 class initialization
| From: | Christian Schneider | Date: | Tue, 23 Mar 2004 17:23:12 +0000 |
| Subject: | Re: php5 class initialization | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-8685@lists.php.net to get a copy of this message | ||
Rasmus Lerdorf wrote:
I could see people doing:
class foo {
function foo() {
...constructor stuff...
}
function __construct() {
$this->foo();
}
}
Why not just leave out __construct in this case? Or am I missing something? This looks pretty ugly to me. And if you really, really want it you can still have a method init() which is called by foo() and __construct().
- Chris