Re: php5 class initialization
| From: | Stanislav Malyshev | Date: | Wed, 24 Mar 2004 10:03:53 +0000 |
| Subject: | Re: php5 class initialization | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-8746@lists.php.net to get a copy of this message | ||
RL>> But we are getting way off the real point which is the question of whether
RL>> you should be allowed to call what I suppose is now the deprecated
RL>> constructor directly or not. I don't see a good reason why it wouldn't be
I don't see any reason to allow two constructors for a class to exist in
the first place, so the question of calling is not that relevant for me.
RL>> treated like a normal method in every way. In a few years when people who
RL>> have never seen PHP4 happen to create a method with the same name as the
RL>> class would get very confused if it didn't work I would think.
If it's documented as "constructed can be specified in two forms:
1. ClassName()
2. __construct()
" then I see no problem that anyone who is good enough to understand what
"<?" means to understand that either.
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109