3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = 0; $num = 2; $array = array(1,2,3,4,5,6,7); foreach($array as $key) { $c++; prev($array); echo key($array); if($c == 6) { break; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 17
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 17
Branch analysis from position: 17
filename:       /in/76M5g
function name:  (null)
number of ops:  19
compiled vars:  !0 = $c, !1 = $num, !2 = $array, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    4     1        ASSIGN                                                   !1, 2
    5     2        ASSIGN                                                   !2, <array>
    6     3      > FE_RESET_R                                       $7      !2, ->17
          4    > > FE_FETCH_R                                               $7, !3, ->17
    7     5    >   PRE_INC                                                  !0
    8     6        INIT_FCALL                                               'prev'
          7        SEND_REF                                                 !2
          8        DO_ICALL                                                 
    9     9        INIT_FCALL                                               'key'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $10     
         12        ECHO                                                     $10
   11    13        IS_EQUAL                                                 !0, 6
         14      > JMPZ                                                     ~11, ->16
   12    15    > > JMP                                                      ->17
    6    16    > > JMP                                                      ->4
         17    >   FE_FREE                                                  $7
   14    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.49 ms | 1399 KiB | 17 Q