hi all.
i'd like to know within a function of a class, where this function has been called from.
example:
1 | $x = "hello";
2 | $x = "cu";
3 | $x = $this->getVar();
4 | echo $x;
5 |
6 | function getVar() {
7 | return _function_called_line;
8 | }
9 | ...
getVar() would return 3, because on line #3 the function was called...
i know that there's a line system var, but is there something like this imaginary _function_called_line too? 🙂
thanks for help!
josh