3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = []; $arr[0] = null; $arr[2] = 2; $arr[1] = 1; $arr[0] = 0; foreach ($arr as $elem) { echo "$elem "; } // prints "2 1 0" !!
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/80h7O
function name:  (null)
number of ops:  17
compiled vars:  !0 = $arr, !1 = $elem
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN_DIM                                               !0, 0
          2        OP_DATA                                                  null
    4     3        ASSIGN_DIM                                               !0, 2
          4        OP_DATA                                                  2
    5     5        ASSIGN_DIM                                               !0, 1
          6        OP_DATA                                                  1
    6     7        ASSIGN_DIM                                               !0, 0
          8        OP_DATA                                                  0
    7     9      > FE_RESET_R                                       $7      !0, ->15
         10    > > FE_FETCH_R                                               $7, !1, ->15
         11    >   NOP                                                      
         12        FAST_CONCAT                                      ~8      !1, '+'
         13        ECHO                                                     ~8
         14      > JMP                                                      ->10
         15    >   FE_FREE                                                  $7
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.73 ms | 1393 KiB | 13 Q