3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.96 ms | 1397 KiB | 13 Q