D
D
Donald_Duck2018-07-19 09:46:10
PHP
Donald_Duck, 2018-07-19 09:46:10

What tools make it easier to learn someone else's code?

Hello! Are there any tools that help to study someone else's code, help in debugging the code? Now I use xdebug, debug_backtrace.
For example, there is this code:

function a($value)
{
    b($value);
}

function b($value)
{
    c($value * 2);
}

function c($value)
{
    return $value / 2;
}

a(10);

Let's say all these functions are declared in completely different files and the call a()too. In order to get the call stack, I do this:
function c($value)
{
    var_dump(debug_backtrace());
    return $value / 2;
}

But this, in my opinion, is not very convenient. you still have to run through all the files to view the body of these functions. Maybe there is some tool for this that will return not only the call stack, but also the body of each function and, in general, all the information that will help to get the big picture?
In general, any information / tools that help in parsing someone else's code and debugging it are of interest. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
m0nym, 2018-07-19
@Donald_Duck

Linters/static analyzers.
And a high-quality IDE, for example, PHPStorm, - the process of jogging to the body is reduced to pressing one hot key.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question