3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = range(1, 10); foreach ($numbers as $skip) { echo $skip . ','; next($numbers); } echo "\n"; next($numbers); // alternative behavour when using by-reference $numbers2 =& $numbers; foreach ($numbers2 as $skip) { echo $skip . ','; next($numbers2); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 27
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 27
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 13
filename:       /in/oBJZI
function name:  (null)
number of ops:  29
compiled vars:  !0 = $numbers, !1 = $skip, !2 = $numbers2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 10
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    3     5      > FE_RESET_R                                       $5      !0, ->13
          6    > > FE_FETCH_R                                               $5, !1, ->13
    4     7    >   CONCAT                                           ~6      !1, '%2C'
          8        ECHO                                                     ~6
    5     9        INIT_FCALL                                               'next'
         10        SEND_REF                                                 !0
         11        DO_ICALL                                                 
    3    12      > JMP                                                      ->6
         13    >   FE_FREE                                                  $5
    7    14        ECHO                                                     '%0A'
    8    15        INIT_FCALL                                               'next'
         16        SEND_REF                                                 !0
         17        DO_ICALL                                                 
   10    18        ASSIGN_REF                                               !2, !0
   11    19      > FE_RESET_R                                       $10     !2, ->27
         20    > > FE_FETCH_R                                               $10, !1, ->27
   12    21    >   CONCAT                                           ~11     !1, '%2C'
         22        ECHO                                                     ~11
   13    23        INIT_FCALL                                               'next'
         24        SEND_REF                                                 !2
         25        DO_ICALL                                                 
   11    26      > JMP                                                      ->20
         27    >   FE_FREE                                                  $10
   14    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.71 ms | 1396 KiB | 17 Q