Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55478 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87783 invoked from network); 17 Sep 2011 14:52:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Sep 2011 14:52:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:64057] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6C/32-05466-844B47E4 for ; Sat, 17 Sep 2011 10:52:56 -0400 Received: by ywa8 with SMTP id 8so4055645ywa.29 for ; Sat, 17 Sep 2011 07:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=xPZU1SkzqfdK9cRpuSH+Xy27xa+iu50Y84Zrsk2u0Z8=; b=l7NYZi+bp/oj4De4VozWLndJGGwQWfVKIMzFHSX9EwBGDRlnDi9fycgotMzTm5+n6J ILsH4UtTKyWCdycuXj+RH+118lkX6NZgwnHBuom8VI0FzRbhbvjutmjNwcvGx+4Th4nl Ed9vdp7D1xVfkdcXMzdtgAxUXJ+olLCZZhn0w= MIME-Version: 1.0 Received: by 10.146.46.3 with SMTP id t3mr576468yat.8.1316271173624; Sat, 17 Sep 2011 07:52:53 -0700 (PDT) Received: by 10.147.125.13 with HTTP; Sat, 17 Sep 2011 07:52:53 -0700 (PDT) In-Reply-To: References: Date: Sat, 17 Sep 2011 16:52:53 +0200 Message-ID: To: Nikita Popov Cc: RQuadling@gmail.com, PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] __constructor parameter limitations. From: tyra3l@gmail.com (Ferenc Kovacs) maybe Richard referring to https://bugs.php.net/bug.php?id=3D55085 ? but those change only affects the abstract classes. Tyrael On Sat, Sep 17, 2011 at 3:43 PM, Nikita Popov w= rote: > Hi Richard! > > Which change are you talking about? I just tried doing: > =C2=A0 =C2=A0 =C2=A0 =C2=A0class A =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 { public function= __construct($a) =C2=A0 =C2=A0 { } } > =C2=A0 =C2=A0class B extends A { public function __construct($a, $b) { } = } > And it worked on 5.4 Beta 1 without errors. > > Nikita > > On Sat, Sep 17, 2011 at 3:27 PM, Richard Quadling w= rote: >> Hi. >> >> With the recent BC with regard the locking of the constructor's >> signature for subclasses, what is the expected mechanism for allowing >> a subclass to have additional parameters? >> >> You can always supply them and use func_get_args() / func_num_args() / >> etc. to read them. >> >> It would seem that the limitation restricts the capabilities. I'm not >> a purist. Software development is a compromise between purity and >> getting the job done in an efficient and understandable manner. >> >> By allowing undocumented parameters to the constructor (due to the >> enforced signature), this would seem to break things on a different >> front (I can't docblock non defined parameters for examples). > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu