3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(1, 2, 3); foreach ( $arr as $value ) { $value = $value * 2 ; } echo $value;die; foreach($arr as $value) { echo $value; //2 4 4 }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 6
filename:       /in/1vSMf
function name:  (null)
number of ops:  15
compiled vars:  !0 = $arr, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $3      !0, ->6
          2    > > FE_FETCH_R                                               $3, !1, ->6
    5     3    >   MUL                                              ~4      !1, 2
          4        ASSIGN                                                   !1, ~4
    4     5      > JMP                                                      ->2
          6    >   FE_FREE                                                  $3
    7     7        ECHO                                                     !1
          8      > EXIT                                                     
    9     9*       FE_RESET_R                                       $6      !0, ->13
         10*       FE_FETCH_R                                               $6, !1, ->13
   10    11*       ECHO                                                     !1
    9    12*       JMP                                                      ->10
         13*       FE_FREE                                                  $6
   11    14*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.24 ms | 1393 KiB | 13 Q