Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82586 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58952 invoked from network); 13 Feb 2015 08:28:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2015 08:28:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.44 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.44 mail-qg0-f44.google.com Received: from [209.85.192.44] ([209.85.192.44:35964] helo=mail-qg0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 22/81-49206-7B5BDD45 for ; Fri, 13 Feb 2015 03:28:40 -0500 Received: by mail-qg0-f44.google.com with SMTP id j5so12137504qga.3 for ; Fri, 13 Feb 2015 00:28:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=NC76F8QK+4oDyMrpHdX/eotVWadQ9Pj3MzTy0/b1FKw=; b=ZkSm1pi3DAAoPEc6vn0/QaEoUBwul4t3VjstVivXkdnH7CgfWfyIqdnD6vHPCdgMPG 5AVVJB3Fg+IUiMHgwny0qpa4YTz+jTRACbdY1TL/56QXy7G0SWZByVm0nJgiwxPIVgEc au1szYg3KBcJVWpS4fQupGW+SHoaBxgmh5b78GO5Quhw2+mPrfvgB/0w3jNHUqKsRWI+ Mm9cxcQKv9YXADN67WEmEJM8r/wFwjaYhAm2vfDtdZey6nWC6AaX3xAgOi157vRpA8Mn sgaBMHgwWqFu5SkJvk3Tk8nR03Mo7cTNAR8FFzxF4WR+0SjPNK4C6F1PHZ7aufIWmEX7 rooQ== X-Received: by 10.229.190.6 with SMTP id dg6mr21771331qcb.16.1423816116883; Fri, 13 Feb 2015 00:28:36 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.198.8 with HTTP; Fri, 13 Feb 2015 00:27:56 -0800 (PST) In-Reply-To: References: Date: Fri, 13 Feb 2015 17:27:56 +0900 X-Google-Sender-Auth: 5h0RhbSVOjCBIAPlj5EnFI9VwE4 Message-ID: To: Andrea Faulds Cc: pierre@pcservice.co.za, PHP Development Content-Type: multipart/alternative; boundary=001a11336798df58a0050ef40501 Subject: Re: [PHP-DEV] [RFC] Deprecate properties using var From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11336798df58a0050ef40501 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, On Thu, Feb 12, 2015 at 8:57 PM, Andrea Faulds wrote: > > On 12 Feb 2015, at 11:51, Pierre du Plessis > wrote: > > > > Before I create an RFC, I just want to get some feedback on a proposal, > to > > deprecated the use of "var" when declaring properties on a class. > > > > This was previously deprecated in PHP 5.0.0 and the deprecation notice > was > > removed in PHP 5.1.3. > > > > My proposal is to deprecate the use of var on properties in PHP 7, and > then > > remove support for it in PHP 8. This compliments the [0] "Remove PHP 4 > > Constructors" RFC, as it is old PHP 4 behaviour, and according to the > docs > > is only "supported for compatibility reasons", and personally I think > users > > should be encourage to use proper visibility when defining properties. > > What=E2=80=99s the benefit here? It seems like a needless backwards-compa= tibility > break. PHP 4 constructors have been proposed to be removed because they > cause problems (Filter::filter) and it simplifies the language. What > problems does var cause? Its existence doesn=E2=80=99t seem to hurt anyon= e - sure, > using public/protected/private is better, but this only matters if you=E2= =80=99re > reading legacy code. I=E2=80=99d also be wary of removing it if we=E2=80= =99re going to get > rid of T_VAR, as that seems like a useful keyword we might reuse later. S= o > I don=E2=80=99t see why we need to remove this. I thought I filed this as Trait bug, but there isn't. I might forgot to report it. http://3v4l.org/pL3Hr Class calls trait function that is PHP4 constructor. This could be resolved by removing PHP4 constructor. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11336798df58a0050ef40501--