3v4l.org

run code in 300+ PHP versions simultaneously
<?php //variant 1 $array = [1,2,3,4,5]; foreach ($array as $item) { break; } var_dump(current($array)); //variant 2 $array = [1,2,3,4,5]; foreach ($array as $item) { continue; } var_dump(current($array));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 5
Branch analysis from position: 5
filename:       /in/R87c7
function name:  (null)
number of ops:  25
compiled vars:  !0 = $array, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $3      !0, ->5
          2    > > FE_FETCH_R                                               $3, !1, ->5
    5     3    > > JMP                                                      ->5
    4     4*       JMP                                                      ->2
          5    >   FE_FREE                                                  $3
    7     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'current'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
   10    12        ASSIGN                                                   !0, <array>
   11    13      > FE_RESET_R                                       $7      !0, ->17
         14    > > FE_FETCH_R                                               $7, !1, ->17
   12    15    > > JMP                                                      ->14
   11    16*       JMP                                                      ->14
         17    >   FE_FREE                                                  $7
   14    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'current'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $8      
         22        SEND_VAR                                                 $8
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.12 ms | 1396 KiB | 17 Q