Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50628 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55167 invoked from network); 27 Nov 2010 17:40:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2010 17:40:29 -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 Solaris 10 (beta) Received: from [217.114.211.66] ([217.114.211.66:65233] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/F3-32860-C8241FC4 for ; Sat, 27 Nov 2010 12:40:28 -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 424A64AE3C for ; Sat, 27 Nov 2010 18:40:25 +0100 (CET) To: PHP internals list Content-Type: text/plain; charset="UTF-8" Date: Sat, 27 Nov 2010 18:40:23 +0100 Message-ID: <1290879624.7033.826.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Subject: RFC: Making T_FUNCTION optional in method declarations From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?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 class Foo { public bar() { echo "Hello World"; } } 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