Fw: Identify which function called another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there any way, I from one function can identify which other function called it, without parameter passing the name manually ?

In code, something like
<?php
    function a() {
        return c();
    }

    function b() {
        return c();
    }

    function c() {
        return 'I got called by'.$name_of_the_function_who_called_me;
    }

    echo b();
?>

where I would like to have function c identify if it was called by function a or b

-- 
Lars B. Jensen, Internet Architect

CareerCross Japan
Japan's premier online career resource for english speaking professionals

http://www.careercross.com

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux