3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = range(1, 10); foreach ($numbers as $skip) { echo $skip . ','; next($numbers); } echo "\n"; // 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 = 17, Position 2 = 24
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 24
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 13
filename:       /in/W5Csm
function name:  (null)
number of ops:  26
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'
   10    15        ASSIGN_REF                                               !2, !0
   11    16      > FE_RESET_R                                       $9      !2, ->24
         17    > > FE_FETCH_R                                               $9, !1, ->24
   12    18    >   CONCAT                                           ~10     !1, '%2C'
         19        ECHO                                                     ~10
   13    20        INIT_FCALL                                               'next'
         21        SEND_REF                                                 !2
         22        DO_ICALL                                                 
   11    23      > JMP                                                      ->17
         24    >   FE_FREE                                                  $9
   14    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.38 ms | 1396 KiB | 17 Q