3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('a' => 'val1', 'b' => array('c' => 68)); $stack = array($array); while (count($stack) !== 0) { foreach ($stack as $k0 => $v0) { foreach ($v0 as $k1 => $v1) { if (is_array($v1)) { $stack[] = $v1; } else { $$k1 = $v1; } unset($k1, $v1); } unset($stack[$k0], $k0, $v0); } } unset($stack); var_dump(array_slice(get_defined_vars(), -10));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 4
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 25
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 25
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 20
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 20
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 20
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 4
Branch analysis from position: 29
Branch analysis from position: 4
Branch analysis from position: 25
filename:       /in/NMWmb
function name:  (null)
number of ops:  40
compiled vars:  !0 = $array, !1 = $stack, !2 = $v0, !3 = $k0, !4 = $v1, !5 = $k1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_ARRAY                                       ~7      !0
          2        ASSIGN                                                   !1, ~7
    5     3      > JMP                                                      ->26
    6     4    > > FE_RESET_R                                       $9      !1, ->25
          5    > > FE_FETCH_R                                       ~10     $9, !2, ->25
          6    >   ASSIGN                                                   !3, ~10
    7     7      > FE_RESET_R                                       $12     !2, ->20
          8    > > FE_FETCH_R                                       ~13     $12, !4, ->20
          9    >   ASSIGN                                                   !5, ~13
    8    10        TYPE_CHECK                                  128          !4
         11      > JMPZ                                                     ~15, ->15
    9    12    >   ASSIGN_DIM                                               !1
         13        OP_DATA                                                  !4
         14      > JMP                                                      ->17
   11    15    >   FETCH_W                      local               $17     !5
         16        ASSIGN                                                   $17, !4
   13    17    >   UNSET_CV                                                 !5
         18        UNSET_CV                                                 !4
    7    19      > JMP                                                      ->8
         20    >   FE_FREE                                                  $12
   15    21        UNSET_DIM                                                !1, !3
         22        UNSET_CV                                                 !3
         23        UNSET_CV                                                 !2
    6    24      > JMP                                                      ->5
         25    >   FE_FREE                                                  $9
    5    26    >   COUNT                                            ~19     !1
         27        IS_NOT_IDENTICAL                                         ~19, 0
         28      > JMPNZ                                                    ~20, ->4
   18    29    >   UNSET_CV                                                 !1
   20    30        INIT_FCALL                                               'var_dump'
         31        INIT_FCALL                                               'array_slice'
         32        INIT_FCALL                                               'get_defined_vars'
         33        DO_ICALL                                         $21     
         34        SEND_VAR                                                 $21
         35        SEND_VAL                                                 -10
         36        DO_ICALL                                         $22     
         37        SEND_VAR                                                 $22
         38        DO_ICALL                                                 
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.95 ms | 1400 KiB | 19 Q