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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.8 ms | 1399 KiB | 13 Q