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']); } if (!empty($array)) { echo '____' . PHP_EOL . '| '; foreach ($array[0] as $key => $val) { echo '' . $key . ''; } echo PHP_EOL; echo '-----' . 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 = 14, Position 2 = 40
Branch analysis from position: 14
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 23
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 38
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 38
Branch analysis from position: 28
2 jumps found. (Code = 77) Position 1 = 30, Position 2 = 35
Branch analysis from position: 30
2 jumps found. (Code = 78) Position 1 = 31, Position 2 = 35
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 35
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
Branch analysis from position: 23
Branch analysis from position: 40
Branch analysis from position: 10
filename:       /in/cTmCZ
function name:  (null)
number of ops:  41
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        ISSET_ISEMPTY_CV                                 ~9      !0
         12        BOOL_NOT                                         ~10     ~9
         13      > JMPZ                                                     ~10, ->40
   13    14    >   ECHO                                                     '____%0A%7C+'
   14    15        FETCH_DIM_R                                      ~11     !0, 0
         16      > FE_RESET_R                                       $12     ~11, ->23
         17    > > FE_FETCH_R                                       ~13     $12, !2, ->23
         18    >   ASSIGN                                                   !3, ~13
   15    19        CONCAT                                           ~15     '', !3
         20        CONCAT                                           ~16     ~15, ''
         21        ECHO                                                     ~16
   14    22      > JMP                                                      ->17
         23    >   FE_FREE                                                  $12
   17    24        ECHO                                                     '%0A'
   18    25        ECHO                                                     '-----%0A'
   19    26      > FE_RESET_R                                       $17     !0, ->38
         27    > > FE_FETCH_R                                               $17, !2, ->38
   20    28    >   ECHO                                                     '%7C+'
   21    29      > FE_RESET_R                                       $18     !2, ->35
         30    > > FE_FETCH_R                                       ~19     $18, !4, ->35
         31    >   ASSIGN                                                   !3, ~19
   22    32        CONCAT                                           ~21     !4, '+%7C+'
         33        ECHO                                                     ~21
   21    34      > JMP                                                      ->30
         35    >   FE_FREE                                                  $18
   24    36        ECHO                                                     '%0A'
   19    37      > JMP                                                      ->27
         38    >   FE_FREE                                                  $17
   26    39        ECHO                                                     '+--------'
   27    40    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.51 ms | 1400 KiB | 15 Q