Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57807 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36713 invoked from network); 10 Feb 2012 09:50:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Feb 2012 09:50:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@stefan-marr.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@stefan-marr.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain stefan-marr.de from 81.20.134.149 cause and error) X-PHP-List-Original-Sender: php@stefan-marr.de X-Host-Fingerprint: 81.20.134.149 vps-1012701-4512.united-hoster.de Received: from [81.20.134.149] ([81.20.134.149:54417] helo=vps-1012701-4512.united-hoster.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7C/80-31626-D48E43F4 for ; Fri, 10 Feb 2012 04:50:06 -0500 Received: from d51a4d67f.access.telenet.be ([81.164.214.127] helo=[192.168.0.20]) by vps-1012701-4512.united-hoster.de with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Rvn7B-0005Ju-DB; Fri, 10 Feb 2012 10:50:01 +0100 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii In-Reply-To: <4F343C47.1020304@easen.co.uk> Date: Fri, 10 Feb 2012 10:49:54 +0100 Cc: internals PHP Content-Transfer-Encoding: quoted-printable Message-ID: <4A078642-29BC-41F0-B900-92E476830675@stefan-marr.de> References: <4F343C47.1020304@easen.co.uk> To: Marc Easen X-Mailer: Apple Mail (2.1084) Subject: Re: [PHP-DEV] Bug #61033 __FUNCTION__ doesn't report correctly in alias trait methods From: php@stefan-marr.de (Stefan Marr) Hi Marc: On 09 Feb 2012, at 22:36, Marc Easen wrote: > The reason why I feel this should be changes to reflect the actual = called function name is that one of main uses of the __FUNCTION__ = constant it to refer back to the function that is currently running, for = the use recursive functions: I still maintain the position that __FUNCTION__, as __LINE__ and = __FILE__, is supposed to be a lexical constant. (In retro-spective, = adapting __CLASS__ to do even more magic might have been a mistake, from = a conceptual point of view.) So far, I was refraining from proposing any additions to the RFC before = 5.4 is finally out and we see how it is used in the wild. But since recursive function calls are indeed a problem, we should look = for a better solution. I think, `self` is already a keyword anyway, perhaps we can use that for = self-referential/recursive function calls in traits?=20 Best regards Stefan --=20 Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525