문제

Possible Duplicate:
PHP - I want to know how to get function trace

I need to see what a php script does when I call it.

I'm calling a script like:

php -f thescript.php --option1 --option2

The code is something like this:

class thescript {

    static function func01($some_parameter) {
        //some code here
    }

    static function func02($some_parameter) {
        //some code here
    }

    static function func03($some_parameter) {
        //some code here
    }

}

function helperFunction01($some_parameter)
{
    //some code here
}

How can I trace all the functions and methods that the call travels?

Best Regards,

도움이 되었습니까?

해결책

You could execute a debug_backtrace() to see through which calls you end up somewhere.

다른 팁

I think you could use xdebug to do this http://xdebug.org/docs/execution_trace

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top