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); 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 = 17, Position 2 = 22
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 22
Branch analysis from position: 22
filename:       /in/URtYl
function name:  (null)
number of ops:  30
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      > FE_RESET_R                                       $8      !0, ->22
         17    > > FE_FETCH_R                                               $8, !1, ->22
   10    18    >   IS_EQUAL                                                 !1, 'c'
         19      > JMPZ                                                     ~9, ->21
         20    > > JMP                                                      ->22
    8    21    > > JMP                                                      ->17
         22    >   FE_FREE                                                  $8
   12    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'current'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $10     
         27        SEND_VAR                                                 $10
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.71 ms | 1396 KiB | 21 Q