Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69358 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60672 invoked from network); 26 Sep 2013 21:19:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Sep 2013 21:19:57 -0000 Authentication-Results: pb1.pair.com header.from=rstoll@tutteli.ch; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rstoll@tutteli.ch; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain tutteli.ch designates 80.74.154.78 as permitted sender) X-PHP-List-Original-Sender: rstoll@tutteli.ch X-Host-Fingerprint: 80.74.154.78 ns73.kreativmedia.ch Linux 2.6 Received: from [80.74.154.78] ([80.74.154.78:44287] helo=hyperion.kreativmedia.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B7/64-37010-BF4A4425 for ; Thu, 26 Sep 2013 17:19:56 -0400 Received: (qmail 7676 invoked from network); 26 Sep 2013 23:19:52 +0200 Received: from heim-032-99.raab-heim.uni-linz.ac.at (HELO RoLaptop) (193.171.32.99) by ns73.kreativmedia.ch with (AES128-SHA encrypted) SMTP; 26 Sep 2013 23:19:48 +0200 To: Date: Thu, 26 Sep 2013 23:19:44 +0200 Message-ID: <004501cebafe$1f46b470$5dd41d50$@tutteli.ch> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0046_01CEBB0E.E2D291B0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac66/aGG94ZbPAPfRWOj4mnfKRHNDA== Content-Language: de-ch Subject: __construct is like a normal method but without E_STRICT From: rstoll@tutteli.ch ("Robert Stoll") ------=_NextPart_000_0046_01CEBB0E.E2D291B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Heya I would like to have some opinions on the topic inconsistency between methods and __construct See the following code: class A { function __construct($a) {} function foo($a) {} } class B extends A { function __construct($a, $b) {} function foo($a, $b) {} } If you work in strict mode, then you will see the error message Strict Standards: Declaration of B::foo() should be compatible with A::foo($a) I perfectly understand that the strict standard cannot be applied to the __construct and I would not suggest to change that. But I think it is somewhat strange that I am able to call __construct as it was a normal method from everywhere. Am I the only one thinking this, is there actually someone who is using __construct as re-initialising method? Cheers, Robert ------=_NextPart_000_0046_01CEBB0E.E2D291B0--