3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = range(1, 3); var_dump(current($arr)); foreach($arr as $val) { var_dump(current($arr)); } var_dump(current($arr));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/4depS
function name:  (null)
number of ops:  28
compiled vars:  !0 = $arr, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 3
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'current'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                                 
    5    11      > FE_RESET_R                                       $6      !0, ->20
         12    > > FE_FETCH_R                                               $6, !1, ->20
    6    13    >   INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'current'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                                 
    5    19      > JMP                                                      ->12
         20    >   FE_FREE                                                  $6
    8    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'current'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $9      
         25        SEND_VAR                                                 $9
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.35 ms | 1387 KiB | 19 Q