3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.64 ms | 1395 KiB | 17 Q