Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57812 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22438 invoked from network); 12 Feb 2012 18:20:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Feb 2012 18:20:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=marc@easen.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=marc@easen.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain easen.co.uk from 74.125.82.54 cause and error) X-PHP-List-Original-Sender: marc@easen.co.uk X-Host-Fingerprint: 74.125.82.54 mail-ww0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:36895] helo=mail-ww0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/D5-63294-8E2083F4 for ; Sun, 12 Feb 2012 13:20:26 -0500 Received: by wgbdq12 with SMTP id dq12so3948942wgb.11 for ; Sun, 12 Feb 2012 10:20:22 -0800 (PST) Received: by 10.180.101.200 with SMTP id fi8mr19914890wib.20.1329070822108; Sun, 12 Feb 2012 10:20:22 -0800 (PST) Received: from [192.168.1.45] (5e0f2b4d.bb.sky.com. [94.15.43.77]) by mx.google.com with ESMTPS id ec3sm16617260wib.1.2012.02.12.10.20.19 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Feb 2012 10:20:20 -0800 (PST) Message-ID: <4F3802D1.3090103@easen.co.uk> Date: Sun, 12 Feb 2012 18:20:01 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120129 Thunderbird/10.0 MIME-Version: 1.0 To: Stefan Marr CC: internals PHP References: <4F343C47.1020304@easen.co.uk> <4A078642-29BC-41F0-B900-92E476830675@stefan-marr.de> In-Reply-To: <4A078642-29BC-41F0-B900-92E476830675@stefan-marr.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkvnCeHa/IsARtnvVThqaqz/aNuQngSY57bXzYG9/jw4GhKEy27Ig+YuE81WB2ScwApNbyJ Subject: Re: [PHP-DEV] Bug #61033 __FUNCTION__ doesn't report correctly in alias trait methods From: marc@easen.co.uk (Marc Easen) On Fri 10 Feb 2012 09:49:54 GMT, Stefan Marr wrote: > 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.) > As with PHP 5.4 you are able change the function name and the class you are running in thanks to traits, so makes sense to update these magic constants to represent the the value at run time as apposed to compile time. __LINE__ and __FILE__ will always be relating to values at compile time. Cheers, Marc