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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.12 ms | 1399 KiB | 13 Q