3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.65 ms | 1395 KiB | 17 Q