3v4l.org

run code in 300+ PHP versions simultaneously
<?php $b = [1, 2, 3]; foreach($b ?: [] as &$v){ $v = $v*2; unset($v); } var_dump($b);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
2 jumps found. (Code = 126) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/OXAd3
function name:  (null)
number of ops:  14
compiled vars:  !0 = $b, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        JMP_SET                                          ~3      !0, ->3
          2        QM_ASSIGN                                        ~3      <array>
          3      > FE_RESET_RW                                      $4      ~3, ->9
          4    > > FE_FETCH_RW                                              $4, !1, ->9
    6     5    >   MUL                                              ~5      !1, 2
          6        ASSIGN                                                   !1, ~5
    7     7        UNSET_CV                                                 !1
    5     8      > JMP                                                      ->4
          9    >   FE_FREE                                                  $4
   10    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.42 ms | 1444 KiB | 14 Q