Trace named callback-style steps as one ordered PHP replay panel.

callback step Named functions keep each transformation visible in replay while PHP stays in a single execution thread.

Callback Step Panel

base
callback_step_panel.php
Replay: real traced execution (multi-file project)
<?php
function add_step($value) {
    return $value + 4;
}

function double_step($value) {
    return $value * 2;
}

$base = 6;
$first = add_step($base);
$second = double_step($first);

echo "base=" . $base . "\n";
echo "first=" . $first . "\n";
echo "second=" . $second . "\n";
<?php
function add_step($value) {
    return $value + 4;
}

function double_step($value) {
    return $value * 2;
}

$base = 3;
$first = add_step($base);
$second = double_step($first);

echo "base=" . $base . "\n";
echo "first=" . $first . "\n";
echo "second=" . $second . "\n";
<?php
function add_step($value) {
    return $value + 4;
}

function double_step($value) {
    return $value * 2;
}

$base = 9;
$first = add_step($base);
$second = double_step($first);

echo "base=" . $base . "\n";
echo "first=" . $first . "\n";
echo "second=" . $second . "\n";
  1. $base ← 6

    10$base→ 6 = 6; //@base=3, 911$first = add_step($base6);12$second = double_step($first);
  2. function add_step($value)

    1<?php2function add_step($value6) {3    return $value6 + 4;4}
  3. $first ← 10

    10$base = 6; //@base=3, 911$first→ 10 = add_step($base6);12$second = double_step($first10);
  4. function double_step($value)

    6function double_step($value10) {7    return $value10 * 2;8}
  5. $second ← 20

    11$first = add_step($base);12$second→ 20 = double_step($first10);1314echo "base=" . $base6 . "\n";15echo "first=" . $first10 . "\n";16echo "second=" . $second20 . "\n";
    outputbase=6
    first=10
    second=20
  1. $base ← 3

    10$base→ 3 = 3;11$first = add_step($base3);12$second = double_step($first);
  2. function add_step($value)

    1<?php2function add_step($value3) {3    return $value3 + 4;4}
  3. $first ← 7

    10$base = 3;11$first→ 7 = add_step($base3);12$second = double_step($first7);
  4. function double_step($value)

    6function double_step($value7) {7    return $value7 * 2;8}
  5. $second ← 14

    11$first = add_step($base);12$second→ 14 = double_step($first7);1314echo "base=" . $base3 . "\n";15echo "first=" . $first7 . "\n";16echo "second=" . $second14 . "\n";
    outputbase=3
    first=7
    second=14
  1. $base ← 9

    10$base→ 9 = 9;11$first = add_step($base9);12$second = double_step($first);
  2. function add_step($value)

    1<?php2function add_step($value9) {3    return $value9 + 4;4}
  3. $first ← 13

    10$base = 9;11$first→ 13 = add_step($base9);12$second = double_step($first13);
  4. function double_step($value)

    6function double_step($value13) {7    return $value13 * 2;8}
  5. $second ← 26

    11$first = add_step($base);12$second→ 26 = double_step($first13);1314echo "base=" . $base9 . "\n";15echo "first=" . $first13 . "\n";16echo "second=" . $second26 . "\n";
    outputbase=9
    first=13
    second=26