3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'a' => 1, 'b' => 2, 'c' => 3], [ 'a' => 4, 'b' => 5, 'c' => 6], [ 'a' => 7, 'b' => 8, 'c' => 9] ]; foreach ($array as &$val) { unset($val['a']); } $array2 = [ [ 'a' => 1, 'b' => 2, 'c' => 3], [ 'a' => 4, 'b' => 5, 'c' => 6], [ 'a' => 7, 'b' => 8, 'c' => 9] ]; $arrayRef = &$array2; unset($arrayRef[0]['a']); unset($arrayRef[1]['a']); unset($arrayRef[2]['a']); foreach ($array as $key => $val) { echo $key . ' => ' . $val['b'] . ', ' . $val['c'] . PHP_EOL; } foreach ($array2 as $key => $val) { echo $key . ' => ' . $val['b'] . ', ' . $val['c'] . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 26
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 26
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 26
2 jumps found. (Code = 77) Position 1 = 28, Position 2 = 39
Branch analysis from position: 28
2 jumps found. (Code = 78) Position 1 = 29, Position 2 = 39
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 26
Branch analysis from position: 5
filename:       /in/Xb0hq
function name:  (null)
number of ops:  41
compiled vars:  !0 = $array, !1 = $val, !2 = $array2, !3 = $arrayRef, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1      > FE_RESET_RW                                      $6      !0, ->5
          2    > > FE_FETCH_RW                                              $6, !1, ->5
    9     3    >   UNSET_DIM                                                !1, 'a'
    8     4      > JMP                                                      ->2
          5    >   FE_FREE                                                  $6
   12     6        ASSIGN                                                   !2, <array>
   18     7        ASSIGN_REF                                               !3, !2
   19     8        FETCH_DIM_UNSET                                  $9      !3, 0
          9        UNSET_DIM                                                $9, 'a'
   20    10        FETCH_DIM_UNSET                                  $10     !3, 1
         11        UNSET_DIM                                                $10, 'a'
   21    12        FETCH_DIM_UNSET                                  $11     !3, 2
         13        UNSET_DIM                                                $11, 'a'
   23    14      > FE_RESET_R                                       $12     !0, ->26
         15    > > FE_FETCH_R                                       ~13     $12, !1, ->26
         16    >   ASSIGN                                                   !4, ~13
   24    17        CONCAT                                           ~15     !4, '+%3D%3E+'
         18        FETCH_DIM_R                                      ~16     !1, 'b'
         19        CONCAT                                           ~17     ~15, ~16
         20        CONCAT                                           ~18     ~17, '%2C+'
         21        FETCH_DIM_R                                      ~19     !1, 'c'
         22        CONCAT                                           ~20     ~18, ~19
         23        CONCAT                                           ~21     ~20, '%0A'
         24        ECHO                                                     ~21
   23    25      > JMP                                                      ->15
         26    >   FE_FREE                                                  $12
   27    27      > FE_RESET_R                                       $22     !2, ->39
         28    > > FE_FETCH_R                                       ~23     $22, !1, ->39
         29    >   ASSIGN                                                   !4, ~23
   28    30        CONCAT                                           ~25     !4, '+%3D%3E+'
         31        FETCH_DIM_R                                      ~26     !1, 'b'
         32        CONCAT                                           ~27     ~25, ~26
         33        CONCAT                                           ~28     ~27, '%2C+'
         34        FETCH_DIM_R                                      ~29     !1, 'c'
         35        CONCAT                                           ~30     ~28, ~29
         36        CONCAT                                           ~31     ~30, '%0A'
         37        ECHO                                                     ~31
   27    38      > JMP                                                      ->28
         39    >   FE_FREE                                                  $22
   29    40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.94 ms | 1390 KiB | 13 Q