3v4l.org

run code in 300+ PHP versions simultaneously
<?php $firstArray = array("a", "b", "c", "d"); next($firstArray); next($firstArray); var_dump(current($firstArray)); reset($firstArray); var_dump(current($firstArray)); foreach ($firstArray as $val) { // Break on "c" if ($val == "c") break; } var_dump(current($firstArray));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 28
Branch analysis from position: 28
filename:       /in/ic2Kf
function name:  (null)
number of ops:  36
compiled vars:  !0 = $firstArray, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'next'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'next'
          5        SEND_REF                                                 !0
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'current'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'reset'
         14        SEND_REF                                                 !0
         15        DO_ICALL                                                 
    8    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'current'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $8      
         20        SEND_VAR                                                 $8
         21        DO_ICALL                                                 
    9    22      > FE_RESET_R                                       $10     !0, ->28
         23    > > FE_FETCH_R                                               $10, !1, ->28
   11    24    >   IS_EQUAL                                                 !1, 'c'
         25      > JMPZ                                                     ~11, ->27
         26    > > JMP                                                      ->28
    9    27    > > JMP                                                      ->23
         28    >   FE_FREE                                                  $10
   13    29        INIT_FCALL                                               'var_dump'
         30        INIT_FCALL                                               'current'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                         $12     
         33        SEND_VAR                                                 $12
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.18 ms | 1396 KiB | 21 Q