3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['a','b','c']; function foobar(){ return next($arr); } $i = 0; while(true) : foobar(); $i += 1; endwhile;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
Branch analysis from position: 3
filename:       /in/PEL6Z
function name:  (null)
number of ops:  8
compiled vars:  !0 = $arr, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 0
   11     2      > JMP                                                      ->6
          3    >   INIT_FCALL                                               'foobar'
          4        DO_FCALL                                      0          
   12     5        ASSIGN_OP                                     1          !1, 1
   11     6    > > JMPNZ                                                    <true>, ->3
   13     7    > > RETURN                                                   1

Function foobar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PEL6Z
function name:  foobar
number of ops:  5
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'next'
          1        SEND_REF                                                 !0
          2        DO_ICALL                                         $1      
          3      > RETURN                                                   $1
    7     4*     > RETURN                                                   null

End of function foobar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.97 ms | 1397 KiB | 16 Q