Variable values in stack trace

This may be an obvious question, but I haven't seen it answered anywhere:

Do the variable values shown in the stack trace reflect the values of those
variables when the function was called or when it called the next function in
the stack?

function f1($x = 1) {
$x = $x + 1;
f2($x)
}
function f2($x){
--some code with a breakpoint.
}
When I look at the stack trace from the breakpoint in f2, what value
of $x will show up in the f1 stack trace.  1 which was the value upon
entering f1, or 2 the value as control transferred to f2?

0

Please sign in to leave a comment.