Get called-from informaiton
Posted: Mon Aug 21, 2006 12:43 pm
Is there a way to get information on a file and line # where a call to a specific function was made?
In other words, say I have the function Foo() in class Bar. In the file test.php, it calls Bar::Foo() on line 15. I want to be able to, in the function Foo(), say "Ok, I was called from test.php on line 15".
Just wondering. I know I can pass this information to the function, just wondering if there was a quicker and more efficient method.
In other words, say I have the function Foo() in class Bar. In the file test.php, it calls Bar::Foo() on line 15. I want to be able to, in the function Foo(), say "Ok, I was called from test.php on line 15".
Just wondering. I know I can pass this information to the function, just wondering if there was a quicker and more efficient method.