function backtrace() {
return debug_backtrace();
}
Sorry, sorry. Couldn't help myself J
Thanks,
Nathan.
Web Controlled Robotic Arm and Beetle
http://www.kennedytechnology.com
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Matias Gertel
Sent: Friday, 3 October 2008 10:22 a.m.
To: [email protected]
Subject: [phpug] Re: dirname of file with calling function
Yea, debug_backtrace does the job. The reason I'm not comfortable with it
it's the "debug" part of it. Doesn't sound like a function intended for
everyday use... but it certainly does the job!
Cheers!
On 3/10/2008, at 10:01 AM, chris burgess wrote:
I've always used debug_backtrace() for this, usually in a function intended
to strip the rest of the noise out. It does seem a little heavy (given that
dbt has a shedload of other data) but I've only found I need it for
debugging.
You might be able to do something with ReflectionFunction, but
debug_backtrace() is probably quicker.
http://nz.php.net/manual/en/language.oop5.reflection.php#language.oop5.refle
ction.reflectionfunction
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---