Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68402 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4888 invoked from network); 7 Aug 2013 20:12:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Aug 2013 20:12:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.115 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.115 smtp115.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.115] ([108.166.43.115:48339] helo=smtp115.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/DE-06453-B3AA2025 for ; Wed, 07 Aug 2013 16:12:43 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp7.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 3F82B1B8078; Wed, 7 Aug 2013 16:12:41 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp7.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id F20BD1B8089; Wed, 7 Aug 2013 16:12:40 -0400 (EDT) Message-ID: <5202AA42.7070006@sugarcrm.com> Date: Wed, 07 Aug 2013 13:12:50 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Sean Cannella CC: "internals@lists.php.net" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: constructor argument promotion From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > https://wiki.php.net/rfc/constructor-promotion 1. From the first glance, it doesn't seem clear how this syntax would interact with magic methods - i.e., if you have __get, would access to $make call it? If not, it's rather un-intuitive since the property is not defined in the class but magic method is not called. 2. What would happen with this code: class Base { public __construct(public $f) {} } class PublicBase extends Base { public __construct($param) { __parent::__construct($param); } } class Child extends PublicBase { public __construct(public $f) { $this->f = 42; parent::__construct($f); } } Note here that whoever writes class Child may not be aware that class Base even exists and how it is implemented, since he implements against PublicBase. 3. What happens if I need to have some arguments that are not properties? 4. How would one extract phpdoc descriptions for such properties? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227