Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55983 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44726 invoked from network); 28 Oct 2011 15:33:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Oct 2011 15:33:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=jeanseb@au-fil-du.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jeanseb@au-fil-du.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain au-fil-du.net designates 178.33.42.204 as permitted sender) X-PHP-List-Original-Sender: jeanseb@au-fil-du.net X-Host-Fingerprint: 178.33.42.204 8.mo6.mail-out.ovh.net Received: from [178.33.42.204] ([178.33.42.204:59381] helo=mo6.mail-out.ovh.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/A4-22011-25BCAAE4 for ; Fri, 28 Oct 2011 11:33:39 -0400 Received: from mail361.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo6.mail-out.ovh.net (Postfix) with SMTP id 58DFEFF8624 for ; Fri, 28 Oct 2011 17:33:57 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 28 Oct 2011 15:33:34 -0000 Received: from ns0.ovh.net (HELO ssl0.ovh.net) (213.186.33.20) by ns0.ovh.net with SMTP; 28 Oct 2011 15:33:34 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Fri, 28 Oct 2011 17:33:34 +0200 To: X-Ovh-Mailout: 178.32.228.6 (mo6.mail-out.ovh.net) In-Reply-To: References: Message-ID: <1e6843072fd03c1ffe2f7394c824e797@localhost> X-Sender: jeanseb@au-fil-du.net User-Agent: RoundCube Webmail/0.4 X-Ovh-Tracer-Id: 14649646639721976267 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -70 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeffedrtdelucetggdotefuucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucculddquddttddmnehnohcuhhhoshhtuchurhhlucdlfedtmd Subject: Re: [PHP-DEV] No inheritance check in constructor =?UTF-8?Q?=3F?= From: jeanseb@au-fil-du.net (=?UTF-8?Q?Jean-S=C3=A9bastien_H=2E?=) Ok it's a documented behaviour, I should read more carefully. http://php.net/manual/en/language.oop5.decon.php Unlike with other methods, PHP will not generate an E_STRICT level error message when __construct() is overridden with different parameters than the parent __construct() method has. But I think, it's a lack in PHP ? On Fri, 28 Oct 2011 17:22:53 +0200, Jean-Sébastien H. wrote: > Hi, > > Is it an expected behaviour ? > > See attached test file. > > > ---- EXPECTED OUTPUT > Strict Standards: Declaration of ObjChild::method() should be > compatible with that of ObjParent::method() in %s on line 15 > > Strict standards: Declaration of ObjChild::__construct() should be > compatible with that of ObjParent::__construct() in %s on line 17 > ---- ACTUAL OUTPUT > Strict Standards: Declaration of ObjChild::method() should be > compatible with that of ObjParent::method() in %s on line 15 > > ---- FAILED > > > > NB : > The real actual output of the phpt is empty. Can we test strict error > with run-tests ? > > > Regards, > -- > Jean-Sébastien H. > au-fil-du.net -- Jean-Sébastien H. au-fil-du.net