#41819 [Opn->Bgs]: Old style Constructor inconsistencies
| From: | tony2001@php.net | Date: | Wed, 27 Jun 2007 08:28:54 +0000 |
| Subject: | #41819 [Opn->Bgs]: Old style Constructor inconsistencies | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114309@lists.php.net to get a copy of this message | ||
ID: 41819
Updated by: tony2001@php.net
Reported By: oancea at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: *
PHP Version: 5.2.3
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2007-06-27 07:46:51] oancea at gmail dot com
Description:
------------
There is an inconsistency between the old style class constructor
(class name) and the new one (__construct) when defining interfaces (see
reproduce code bellow).
Reproduce code:
---------------
interface IConfigurator {
public function __construct();
}
class XmlConfigurator implements IConfigurator {
public function XmlConfigurator() {
printf("%s\n", __METHOD__);
}
}
$config = new XmlConfigurator();
Expected result:
----------------
One of:
* XmlConfigurator::XmlConfigurator
* Fatal error: old style constructor is deprecated
Actual result:
--------------
Fatal error: Class XmlConfigurator contains 1 abstract method and must
therefore be declared abstract or implement the remaining methods
(IConfigurator::__construct) in
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41819&edit=1