Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50804 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1908 invoked from network); 2 Dec 2010 09:59:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2010 09:59:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=ar@ez.no; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ar@ez.no; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ez.no from 209.85.160.170 cause and error) X-PHP-List-Original-Sender: ar@ez.no X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:43206] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/D3-15182-8FD67FC4 for ; Thu, 02 Dec 2010 04:59:22 -0500 Received: by gyf2 with SMTP id 2so4360577gyf.29 for ; Thu, 02 Dec 2010 01:59:18 -0800 (PST) Received: by 10.150.185.20 with SMTP id i20mr1048713ybf.397.1291283958399; Thu, 02 Dec 2010 01:59:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.103.17 with HTTP; Thu, 2 Dec 2010 01:58:56 -0800 (PST) In-Reply-To: References: <1290879624.7033.826.camel@guybrush> Date: Thu, 2 Dec 2010 10:58:56 +0100 Message-ID: To: Patrick ALLAERT Cc: Kalle Sommer Nielsen , =?UTF-8?Q?Johannes_Schl=C3=BCter?= , PHP internals list Content-Type: multipart/alternative; boundary=000e0cd47d10a501db04966a7947 Subject: Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations From: ar@ez.no (=?UTF-8?B?QW5kcsOpIFLDuG1ja2U=?=) --000e0cd47d10a501db04966a7947 Content-Type: text/plain; charset=UTF-8 On Thu, Dec 2, 2010 at 10:34 AM, Patrick ALLAERT wrote: > 2010/11/30 Kalle Sommer Nielsen : > > Hi > > > > 2010/11/30 Patrick ALLAERT : > >> With this patch, something looks inconsistent to me: > >> Both properties and methods have a visibility > >> (public|protected|private) and a keyword: "var" (T_VAR) and "function" > >> (T_FUNCTION) respectively. > >> However "private var $foo;" generates a fatal error but "private > >> function foo(){}" not? > > > > The "var" keyword is an alias of the "public" keyword for BC with > > PHP4. So it would be illogically to declare a property both private > > and public at the same time ;-) > > Shouldn't we get rid of that kind of pre-PHP5 stuff _before_ > introducing the possible omission of T_FUNCTION? Why? This will break lots of code, does it improve anything while at it? Is 'var' hindering anything? Is it taking up a lot of code? If it is removed then that should be in trunk aka "6.0" the 2nd , and not in 5.x. --000e0cd47d10a501db04966a7947--