Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50635 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89031 invoked from network); 27 Nov 2010 18:35:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2010 18:35:55 -0000 X-Host-Fingerprint: 77.100.66.170 cpc4-newt30-2-0-cust169.newt.cable.virginmedia.com Received: from [77.100.66.170] ([77.100.66.170:19782] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/E1-14730-A8F41FC4 for ; Sat, 27 Nov 2010 13:35:55 -0500 Message-ID: To: internals@lists.php.net References: <1290879624.7033.826.camel@guybrush> In-Reply-To: <1290879624.7033.826.camel@guybrush> Date: Sat, 27 Nov 2010 18:35:40 -0000 Lines: 1 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3502.922 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3502.922 X-Posted-By: 77.100.66.170 Subject: Re: RFC: Making T_FUNCTION optional in method declarations From: ross@php.net ("Ross Masters") +1, has crossed my mind before =) "Johannes "Schlüter"" wrote in message news:1290879624.7033.826.camel@guybrush... 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