3v4l.org

run code in 300+ PHP versions simultaneously
<?php $entries = [0,1]; $array = [ 0 => function() { echo "0"; }, 1 => function() { echo "1"; }, ]; foreach($entries as $key => $val) { $array[$key](); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/U7E8V
function name:  (null)
number of ops:  15
compiled vars:  !0 = $entries, !1 = $array, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FU7E8V%3A5%240'
    7     2        INIT_ARRAY                                       ~6      ~5, 0
    8     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FU7E8V%3A8%241'
   10     4        ADD_ARRAY_ELEMENT                                ~6      ~7, 1
    4     5        ASSIGN                                                   !1, ~6
   13     6      > FE_RESET_R                                       $9      !0, ->13
          7    > > FE_FETCH_R                                       ~10     $9, !2, ->13
          8    >   ASSIGN                                                   !3, ~10
   14     9        FETCH_DIM_R                                      ~12     !1, !3
         10        INIT_DYNAMIC_CALL                                        ~12
         11        DO_FCALL                                      0          
   13    12      > JMP                                                      ->7
         13    >   FE_FREE                                                  $9
   15    14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FU7E8V%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U7E8V
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     '0'
    7     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FU7E8V%3A5%240

Function %00%7Bclosure%7D%2Fin%2FU7E8V%3A8%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U7E8V
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     '1'
   10     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FU7E8V%3A8%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.99 ms | 1399 KiB | 13 Q