note 54639 added to language.oop5.decon
| From: | dominics at gmail dot com | Date: | Mon, 11 Jul 2005 02:12:52 +0000 |
| Subject: | note 54639 added to language.oop5.decon | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91755@lists.php.net to get a copy of this message | ||
If you're using E_STRICT error reporting, PHP will tell you if you define both __construct()
and an old-style constructor (a function with the same name as the class) together in a class. Note
that this occurs even if the old constructor function is abstract or final (for instance, if you
were intending to only use it in a sub-class). Be wary of this if you're trying to implement
the 'command' design pattern.
The solution? Either turn E_STRICT off (and possibly forgo some other important notices), rename
your function (and possibly make things a little more complicated), or look at using an interface.
----
Manual Page -- http://www.php.net/manual/en/language.oop5.decon.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54639
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54639&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54639&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54639&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54639&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54639&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54639&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54639&report=yes
Search -- http://master.php.net/manage/user-notes.php