3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'deep' => [ 'bar' => 'foo', ], ]; foreach($arr['deep'] ?? [] as &$value) { $value = 'x'; } var_dump('x' === $arr['deep']['bar']); foreach($arr['deep'] as &$value) { $value = 'x'; } var_dump('x' === $arr['deep']['bar']);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 126) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 8
2 jumps found. (Code = 125) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
2 jumps found. (Code = 126) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 8
filename:       /in/gpAOM
function name:  (null)
number of ops:  28
compiled vars:  !0 = $arr, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        FETCH_DIM_IS                                     ~3      !0, 'deep'
          2        COALESCE                                         ~4      ~3
          3        QM_ASSIGN                                        ~4      <array>
          4      > FE_RESET_RW                                      $5      ~4, ->8
          5    > > FE_FETCH_RW                                              $5, !1, ->8
   10     6    >   ASSIGN                                                   !1, 'x'
    9     7      > JMP                                                      ->5
          8    >   FE_FREE                                                  $5
   13     9        INIT_FCALL                                               'var_dump'
         10        FETCH_DIM_R                                      ~7      !0, 'deep'
         11        FETCH_DIM_R                                      ~8      ~7, 'bar'
         12        IS_IDENTICAL                                     ~9      ~8, 'x'
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                                 
   15    15        FETCH_DIM_W                                      $11     !0, 'deep'
         16      > FE_RESET_RW                                      $12     $11, ->20
         17    > > FE_FETCH_RW                                              $12, !1, ->20
   16    18    >   ASSIGN                                                   !1, 'x'
   15    19      > JMP                                                      ->17
         20    >   FE_FREE                                                  $12
   19    21        INIT_FCALL                                               'var_dump'
         22        FETCH_DIM_R                                      ~14     !0, 'deep'
         23        FETCH_DIM_R                                      ~15     ~14, 'bar'
         24        IS_IDENTICAL                                     ~16     ~15, 'x'
         25        SEND_VAL                                                 ~16
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.47 ms | 1396 KiB | 15 Q