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 ($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 = 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 = 12
Branch analysis from position: 8
2 jumps found. (Code = 126) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
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 = 29, Position 2 = 40
Branch analysis from position: 29
2 jumps found. (Code = 78) Position 1 = 30, Position 2 = 40
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
Branch analysis from position: 26
Branch analysis from position: 12
Branch analysis from position: 5
filename:       /in/iLQEa
function name:  (null)
number of ops:  42
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      !2, ->12
          8    > > FE_FETCH_RW                                      ~8      $7, !1, ->12
          9    >   ASSIGN                                                   !3, ~8
   19    10        UNSET_DIM                                                !1, 'a'
   18    11      > JMP                                                      ->8
         12    >   FE_FREE                                                  $7
   23    13        ECHO                                                     'First+array%3A+%0A'
   24    14      > FE_RESET_R                                       $10     !0, ->26
         15    > > FE_FETCH_R                                       ~11     $10, !1, ->26
         16    >   ASSIGN                                                   !3, ~11
   25    17        CONCAT                                           ~13     !3, '+%3D%3E+'
         18        FETCH_DIM_R                                      ~14     !1, 'b'
         19        CONCAT                                           ~15     ~13, ~14
         20        CONCAT                                           ~16     ~15, '%2C+'
         21        FETCH_DIM_R                                      ~17     !1, 'c'
         22        CONCAT                                           ~18     ~16, ~17
         23        CONCAT                                           ~19     ~18, '%0A'
         24        ECHO                                                     ~19
   24    25      > JMP                                                      ->15
         26    >   FE_FREE                                                  $10
   28    27        ECHO                                                     'Second+array%3A+%0A'
   29    28      > FE_RESET_R                                       $20     !2, ->40
         29    > > FE_FETCH_R                                       ~21     $20, !1, ->40
         30    >   ASSIGN                                                   !3, ~21
   30    31        CONCAT                                           ~23     !3, '+%3D%3E+'
         32        FETCH_DIM_R                                      ~24     !1, 'b'
         33        CONCAT                                           ~25     ~23, ~24
         34        CONCAT                                           ~26     ~25, '%2C+'
         35        FETCH_DIM_R                                      ~27     !1, 'c'
         36        CONCAT                                           ~28     ~26, ~27
         37        CONCAT                                           ~29     ~28, '%0A'
         38        ECHO                                                     ~29
   29    39      > JMP                                                      ->29
         40    >   FE_FREE                                                  $20
   31    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.42 ms | 1399 KiB | 13 Q