Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55493 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39842 invoked from network); 17 Sep 2011 21:53:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Sep 2011 21:53:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.215.45 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@googlemail.com X-Host-Fingerprint: 209.85.215.45 mail-ew0-f45.google.com Received: from [209.85.215.45] ([209.85.215.45:53968] helo=mail-ew0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/6A-05466-4D6157E4 for ; Sat, 17 Sep 2011 17:53:25 -0400 Received: by ewy28 with SMTP id 28so1762710ewy.32 for ; Sat, 17 Sep 2011 14:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mYdrm+UfGpZH99Dylneh4ZKfySHA8MoszTOnc35uEL4=; b=PlS6mbZxlJbf1TuEwOfY+4qym4XSJeFplu+pFmmfzmU9syFiQxTJUdUfIFE28xHIe9 848XDBhDerjvZQwjdxW9tmBPqDmpLb6dT7f343kubEkJKngAhmervN23uMlavoHekXoz 58XDRdorOg5t1NGGAmHek0tZzEWKwMpejUnq4= MIME-Version: 1.0 Received: by 10.14.35.163 with SMTP id u35mr262945eea.64.1316296400535; Sat, 17 Sep 2011 14:53:20 -0700 (PDT) Received: by 10.14.99.205 with HTTP; Sat, 17 Sep 2011 14:53:20 -0700 (PDT) In-Reply-To: References: Date: Sat, 17 Sep 2011 23:53:20 +0200 Message-ID: To: RQuadling@gmail.com Cc: Ferenc Kovacs , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] __constructor parameter limitations. From: nikita.ppv@googlemail.com (Nikita Popov) On Sat, Sep 17, 2011 at 11:39 PM, Richard Quadling wrote: > My question was due to the documentation commit > http://news.php.net/php.doc.cvs/8818 and > http://news.php.net/php.doc.cvs/8819. Just to clarify (as I'm not sure you got that change right): PHP has enforced signatures for methods defined in abstract classes already before 5.4. ("Enforce" doesn't mean that it's equal. The inheriting class can for example define further optional arguments. Or change default values.) But constructors were excluded from this for some reason. As of 5.4 constructors are handled the same way as other methods. So, in 5.4 nothing fundamental was changed, only constructors were adjusted to be handled like any other function. In my eyes this makes sense. Abstract methods define method signatures, just like interfaces do. So they should be enforced as such. (The thing about the new E_STRICT warning with normal classes is a very different thing. That behavior doesn't make any sense to me.) Nikita