Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50638 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29220 invoked from network); 27 Nov 2010 20:33:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2010 20:33:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=marcello.duarte@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=marcello.duarte@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: marcello.duarte@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:50037] helo=mail-iw0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/00-29052-2FA61FC4 for ; Sat, 27 Nov 2010 15:32:58 -0500 Received: by iwn4 with SMTP id 4so1018017iwn.29 for ; Sat, 27 Nov 2010 12:32:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=B9RG4FqB2wH+pBLzkW39TZVAinJ4Itk0ghjzgQW++Lo=; b=kKBxHbv1eQ+JcD/WcpaBK4pqYrMFrr6c2hOxzDefk8tbnb12OXH3VVR57DmBd45f1j wpvmG+qCnqNki3t0WL5e6eUVz3XQgF0JjwvIZamPTQ8HhhM8ZufKePzHPs5B578VJBV5 K3/w3GuQzd8lOWlcvl1zshbDDmdCFOL/0W3c4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=H4hTwC9wbI+301WFJuWDEDdGuDalpqWkZ+DKBUmgIiEBYQhR2yeqTg5esmu84fMVRX SjpUGEaaeqeyhpp9e+9chnpF5gIEtD8HC0ovJKx+Yc78969Zp8XlDQCDVPXfJ2nijqd4 8QqiG5+49Rt00dHGx9+FojpUrqVIKXeEZbmQk= MIME-Version: 1.0 Received: by 10.231.191.16 with SMTP id dk16mr205315ibb.89.1290889964566; Sat, 27 Nov 2010 12:32:44 -0800 (PST) Received: by 10.231.145.200 with HTTP; Sat, 27 Nov 2010 12:32:44 -0800 (PST) In-Reply-To: <1290879624.7033.826.camel@guybrush> References: <1290879624.7033.826.camel@guybrush> Date: Sat, 27 Nov 2010 20:32:44 +0000 Message-ID: To: PHP internals list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations From: marcello.duarte@gmail.com (Marcello Duarte) +1 to being able to omit the function keyword. 2010/11/27 Johannes Schl=FCter : > Hi, > > every now and then while writing classes I forget to add the "function" > keyword between my visibility modifier and the method name in a class > declaration. I don't think it is required for readability and it is not > needed by the parser to prevent conflicts, I therefore propose the > following RFC incl. patch to allow writing > > =A0 =A0 =A0 =A0class Foo { > =A0 =A0 =A0 =A0 =A0 =A0public bar() { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0echo "Hello World"; > =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0} > > Without T_FUNCTION token. In my opinion an access modifier /public, > private protected, static, final) should still be required for keeping > readability. > > RFC: http://wiki.php.net/rfc/optional-t-function > Patch: http://schlueters.de/~johannes/php/zend_optional_t_function.diff > > johannes > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >