Bug #13944 Updated: in a function, I want to know the file/line that CALLED the function

From: Date: Fri, 05 Apr 2002 15:45:44 +0000
Subject: Bug #13944 Updated: in a function, I want to know the file/line that CALLED the function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-4142@lists.php.net to get a copy of this message
ID: 13944 Updated by: derick@php.net Reported By: tysonlt_SPAM_IS_EVIL@webmedia.com.au -Status: Open +Status: Assigned Bug Type: Feature/Change Request Operating System: Linux RH7.1 PHP Version: 4.0.6 New Comment: 80% done with this. Just need some more testing. regards, Derick Previous Comments: ------------------------------------------------------------------------ [2002-04-05 10:03:58] csaba@ketszeri.hu On the Hungarian PHP list this is frequent question, and surely most of the developers -including me :)- would love it too! Naturally it is another self-administering task to the interpreter, so I would suggest to make it an optional 'developement-time' feature. Aabout nested includes: it would be good to return a complex data structure, when the programmer can step-back the calling process. Csabii ------------------------------------------------------------------------ [2001-11-05 21:41:57] tysonlt_SPAM_IS_EVIL@webmedia.com.au I would love to be able, from within a function, to find out the file/line no that called me. For example: /// some code /// $x = call_a_function(); function call_a_function() { echo "MY LOCATION: __FILE__ : __LINE__"; /*** This is what I would LOVE ***/ echo "CALLED FROM: __CALLING_FILE__ : __CALLING_LINE__"; } That would be fantastic! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=13944&edit=1

« previous php.bugs (#4142) next »