ClanKiller.com http://forums.clankiller.com/ |
|
Programmatically determine originating method? http://forums.clankiller.com/viewtopic.php?f=24&t=2418 |
Page 1 of 1 |
Author: | Satis [ Thu Jun 28, 2007 7:37 am ] |
Post subject: | Programmatically determine originating method? |
ok... so... is there any way to programmatically determine the name of the method you're currently in, preferably with the values passed to it? So far I've figured out how to... get the current class :: get_class($this) or get_class($instantiated_class); get the current line number :: __LINE__ but not the method. If I could programmatically get the method too that would be COOLZ0R! |
Author: | Pig [ Thu Jun 28, 2007 8:54 pm ] |
Post subject: | |
Yes, but not directly. http://us2.php.net/manual/en/function.d ... ktrace.php function getFunctionName() { $backtrace = debug_backtrace(); return $backtrace[1]['function']; } |
Author: | Satis [ Fri Jun 29, 2007 6:18 am ] |
Post subject: | |
neat. Thanks. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |