Faqts : Business : Programming : Shopping For You : PHP : kms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

26 of 27 people (96%) answered Yes
Recently 10 of 10 people (100%) answered Yes

Entry

Is there a PHP function similar to Perl's "caller" which will return subroutine context?

Jul 16th, 2009 15:25
forum net tr, Wouter van Vliet, Ryan, http://nl.php.net/manual/en/function.debug-backtrace.php


Yes. For a complete traceback of all places your script were before it 
arrived at the place you want to know where you were simply call 
debug_backtrace();

It will return a multidimensional array containing the function, line, 
file, class, type and args (where appropriate).

So, if you want to know from where your function (or subroutine) is 
called you'll need the second (index 1) item in the array. The first 
(index 0) contains information about the function from where 
debug_backtrace() is called.

Note: requires PHP 4.3.0 or higher









full forum http://www.forumnettr.com/forum/ 
secilmis youtube videolari http://www.youtubevideolari.net/ youtube videos
online video izle tr tube http://www.videotrtube.com/
firmalar sirketler rehberi http://www.sirketfirmarehberi.com/ firma
sirket rehberi adres telefon bilgileri
full program full oyun http://www.forumnettr.com/