Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50643 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44425 invoked from network); 27 Nov 2010 22:14:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2010 22:14:39 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 ns.km36107.keymachine.de Received: from [217.114.211.66] ([217.114.211.66:42132] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/62-29052-DC281FC4 for ; Sat, 27 Nov 2010 17:14:38 -0500 Received: from [192.168.1.29] (ppp-93-104-47-37.dynamic.mnet-online.de [93.104.47.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 1C6E06296A; Sat, 27 Nov 2010 23:14:35 +0100 (CET) To: Mike Van Riel Cc: PHP internals list In-Reply-To: <01CEF2CA-065B-47E6-987F-4FB98B9A6F88@naenius.com> References: <1290879624.7033.826.camel@guybrush> <01CEF2CA-065B-47E6-987F-4FB98B9A6F88@naenius.com> Content-Type: text/plain; charset="UTF-8" Date: Sat, 27 Nov 2010 23:14:34 +0100 Message-ID: <1290896074.7033.859.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Sat, 2010-11-27 at 22:58 +0100, Mike Van Riel wrote: > With this patch I will loose this recognition point and the first > solution that comes to mind is to search for () or arguments. This > sounds rather hackish to me, might I be missing a solution? The rule is something like [ T_PUBLIC | T_PROTECTED | T_PRIVATE | T_STATIC | T_ABSTRACT ] { & } T_STRING "(" param_list ")" { "{" statement_ist "}" } Where [] marks a choice of one or more and {} something optional. I think you could detect this similar to the way you're dealing with properties. If the T_STRING after the visibility modifier begins with a "$" it is a property, else it is a method. If the visibility modifier is followed by a "&" it is a method returning a reference. > Another question is: when would you like to have this released? PHP- > next? (thus either 5.4, 6, 7 or whichever is next?). I'd like it asap. But let's see where the version discussions go, I think this should be grouped together with Felipe's direct dereferencing of new objects etc. johannes