3v4l.org

run code in 300+ PHP versions simultaneously
<?php $loops_count = 0; $arr = array('apple1', 'orange1', 'banana1', 'potato1', 'cocos1', 'lime1'); do { if(next($arr) === false){ reset($arr); $loops_count++; } var_dump(current($arr)); } while ($loops_count < 3);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
Branch analysis from position: 11
filename:       /in/tRoEM
function name:  (null)
number of ops:  20
compiled vars:  !0 = $loops_count, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    4     1        ASSIGN                                                   !1, <array>
    6     2    >   INIT_FCALL                                               'next'
          3        SEND_REF                                                 !1
          4        DO_ICALL                                         $4      
          5        TYPE_CHECK                                    4          $4
          6      > JMPZ                                                     ~5, ->11
    7     7    >   INIT_FCALL                                               'reset'
          8        SEND_REF                                                 !1
          9        DO_ICALL                                                 
    8    10        PRE_INC                                                  !0
   10    11    >   INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'current'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $8      
         15        SEND_VAR                                                 $8
         16        DO_ICALL                                                 
   11    17        IS_SMALLER                                               !0, 3
         18      > JMPNZ                                                    ~10, ->2
         19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.76 ms | 1395 KiB | 21 Q