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] ]; $column = array_column($array, 'a'); foreach ($array as &$val) { unset($val['a']); } next($array); reset($array); if (!empty($array)) { echo ' _______' . PHP_EOL . '| '; foreach ($array[0] as $key => $val) { echo $key . ' | '; } echo PHP_EOL . ' -------' . PHP_EOL; foreach ($array as $val) { echo '| '; foreach($val as $key => $veryVal) { echo $veryVal . ' | '; } echo PHP_EOL; } echo ' -------'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 126) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 44
Branch analysis from position: 20
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 28
2 jumps found. (Code = 77) Position 1 = 31, Position 2 = 42
Branch analysis from position: 31
2 jumps found. (Code = 78) Position 1 = 32, Position 2 = 42
Branch analysis from position: 32
2 jumps found. (Code = 77) Position 1 = 34, Position 2 = 39
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 39
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 39
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
Branch analysis from position: 28
Branch analysis from position: 44
Branch analysis from position: 10
filename:       /in/RfrTf
function name:  (null)
number of ops:  45
compiled vars:  !0 = $array, !1 = $column, !2 = $val, !3 = $key, !4 = $veryVal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'array_column'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'a'
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    9     6      > FE_RESET_RW                                      $8      !0, ->10
          7    > > FE_FETCH_RW                                              $8, !2, ->10
   10     8    >   UNSET_DIM                                                !2, 'a'
    9     9      > JMP                                                      ->7
         10    >   FE_FREE                                                  $8
   12    11        INIT_FCALL                                               'next'
         12        SEND_REF                                                 !0
         13        DO_ICALL                                                 
   13    14        INIT_FCALL                                               'reset'
         15        SEND_REF                                                 !0
         16        DO_ICALL                                                 
   14    17        ISSET_ISEMPTY_CV                                 ~11     !0
         18        BOOL_NOT                                         ~12     ~11
         19      > JMPZ                                                     ~12, ->44
   15    20    >   ECHO                                                     '+_______%0A%7C+'
   16    21        FETCH_DIM_R                                      ~13     !0, 0
         22      > FE_RESET_R                                       $14     ~13, ->28
         23    > > FE_FETCH_R                                       ~15     $14, !2, ->28
         24    >   ASSIGN                                                   !3, ~15
   17    25        CONCAT                                           ~17     !3, '+%7C+'
         26        ECHO                                                     ~17
   16    27      > JMP                                                      ->23
         28    >   FE_FREE                                                  $14
   19    29        ECHO                                                     '%0A+-------%0A'
   20    30      > FE_RESET_R                                       $18     !0, ->42
         31    > > FE_FETCH_R                                               $18, !2, ->42
   21    32    >   ECHO                                                     '%7C+'
   22    33      > FE_RESET_R                                       $19     !2, ->39
         34    > > FE_FETCH_R                                       ~20     $19, !4, ->39
         35    >   ASSIGN                                                   !3, ~20
   23    36        CONCAT                                           ~22     !4, '+%7C+'
         37        ECHO                                                     ~22
   22    38      > JMP                                                      ->34
         39    >   FE_FREE                                                  $19
   25    40        ECHO                                                     '%0A'
   20    41      > JMP                                                      ->31
         42    >   FE_FREE                                                  $18
   27    43        ECHO                                                     '+-------'
   28    44    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.05 ms | 1400 KiB | 19 Q