3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (array(1, 2, 3) as $n => $e) { print_r(array($n, $e)); } while (list($n, $e) = each (array(1, 2, 3))) { print_r(array($n, $e)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 9
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 11
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 11
Branch analysis from position: 24
Branch analysis from position: 11
Branch analysis from position: 9
filename:       /in/8bLSg
function name:  (null)
number of ops:  25
compiled vars:  !0 = $e, !1 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > FE_RESET_R                                       $2      <array>, ->9
          1    > > FE_FETCH_R                                       ~3      $2, !0, ->9
          2    >   ASSIGN                                                   !1, ~3
    4     3        INIT_FCALL                                               'print_r'
          4        INIT_ARRAY                                       ~5      !1
          5        ADD_ARRAY_ELEMENT                                ~5      !0
          6        SEND_VAL                                                 ~5
          7        DO_ICALL                                                 
    3     8      > JMP                                                      ->1
          9    >   FE_FREE                                                  $2
    8    10      > JMP                                                      ->16
    9    11    >   INIT_FCALL                                               'print_r'
         12        INIT_ARRAY                                       ~7      !1
         13        ADD_ARRAY_ELEMENT                                ~7      !0
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                                 
    8    16    >   INIT_FCALL_BY_NAME                                       'each'
         17        SEND_VAL_EX                                              <array>
         18        DO_FCALL                                      0  $9      
         19        FETCH_LIST_R                                     $10     $9, 0
         20        ASSIGN                                                   !1, $10
         21        FETCH_LIST_R                                     $12     $9, 1
         22        ASSIGN                                                   !0, $12
         23      > JMPNZ                                                    $9, ->11
   10    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.8 ms | 1396 KiB | 15 Q