3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ [ [ 'Date' => '2021-03-15T00:00:00.0000000+01:00', 'Arena' => ['Id' => 181796, 'Name' => 'Motala bibliotek'], 'Description' => null, 'IsCanceled' => null ], [ 'Date' => '2021-03-16T00:00:00.0000000+01:00', 'Arena' => ['Id' => 181796, 'Name' => 'Motala bibliotek'], 'Description' => null, 'IsCanceled' => null ], [ 'Date' => '2021-03-17T00:00:00.0000000+01:00', 'Arena' => ['Id' => 181796, 'Name' => 'Motala bibliotek'], 'Description' => null, 'IsCanceled' => null ] ], [ [ 'Date' => '2021-03-15T00:00:00.0000000+01:00', 'Arena' => ['Id' => 181796, 'Name' => 'Motala bibliotek'], 'Description' => null, 'IsCanceled' => null ], [ 'Date' => '2021-03-16T00:00:00.0000000+01:00', 'Arena' => ['Id' => 181796, 'Name' => 'Motala bibliotek'], 'Description' => null, 'IsCanceled' => null ] ] ]; var_export( array_column(array_merge(...$data), 'Date') ); echo "\n---\n"; $result1 = []; array_walk_recursive( $data, function($v, $k) use (&$result1) { if ($k === 'Date') { $result1[] = $v; } } ); var_export($result1); echo "\n---\n"; $result2 = []; foreach ($data as $group) { array_push($result2, ...array_column($group, 'Date')); } var_export($result2); echo "\n---\n"; $result3 = []; foreach ($data as $group) { foreach ($group as $row) { if (array_key_exists('Date', $row)) { $result3[] = $row['Date']; } } } var_export($result3); echo "\n---\n"; $result4 = []; foreach ($data as $group) { foreach ($group as ['Date' => $result4[]]); } var_export($result4);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 37
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 37
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 37
2 jumps found. (Code = 77) Position 1 = 44, Position 2 = 55
Branch analysis from position: 44
2 jumps found. (Code = 78) Position 1 = 45, Position 2 = 55
Branch analysis from position: 45
2 jumps found. (Code = 77) Position 1 = 46, Position 2 = 53
Branch analysis from position: 46
2 jumps found. (Code = 78) Position 1 = 47, Position 2 = 53
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 52
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 52
Branch analysis from position: 53
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 53
Branch analysis from position: 55
2 jumps found. (Code = 77) Position 1 = 62, Position 2 = 72
Branch analysis from position: 62
2 jumps found. (Code = 78) Position 1 = 63, Position 2 = 72
Branch analysis from position: 63
2 jumps found. (Code = 77) Position 1 = 64, Position 2 = 70
Branch analysis from position: 64
2 jumps found. (Code = 78) Position 1 = 65, Position 2 = 70
Branch analysis from position: 65
1 jumps found. (Code = 42) Position 1 = 64
Branch analysis from position: 64
Branch analysis from position: 70
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
Branch analysis from position: 70
Branch analysis from position: 72
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 72
Branch analysis from position: 55
Branch analysis from position: 37
filename:       /in/bnRrP
function name:  (null)
number of ops:  77
compiled vars:  !0 = $data, !1 = $result1, !2 = $result2, !3 = $group, !4 = $result3, !5 = $row, !6 = $result4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   40     1        INIT_FCALL                                               'var_export'
   41     2        INIT_FCALL                                               'array_column'
          3        INIT_FCALL                                               'array_merge'
          4        SEND_UNPACK                                              !0
          5        CHECK_UNDEF_ARGS                                         
          6        DO_ICALL                                         $8      
          7        SEND_VAR                                                 $8
          8        SEND_VAL                                                 'Date'
          9        DO_ICALL                                         $9      
         10        SEND_VAR                                                 $9
   40    11        DO_ICALL                                                 
   44    12        ECHO                                                     '%0A---%0A'
   46    13        ASSIGN                                                   !1, <array>
   47    14        INIT_FCALL                                               'array_walk_recursive'
   48    15        SEND_REF                                                 !0
   49    16        DECLARE_LAMBDA_FUNCTION                          ~12     [0]
         17        BIND_LEXICAL                                             ~12, !1
   53    18        SEND_VAL                                                 ~12
   47    19        DO_ICALL                                                 
   55    20        INIT_FCALL                                               'var_export'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
   57    23        ECHO                                                     '%0A---%0A'
   59    24        ASSIGN                                                   !2, <array>
   60    25      > FE_RESET_R                                       $16     !0, ->37
         26    > > FE_FETCH_R                                               $16, !3, ->37
   61    27    >   INIT_FCALL                                               'array_push'
         28        SEND_REF                                                 !2
         29        INIT_FCALL                                               'array_column'
         30        SEND_VAR                                                 !3
         31        SEND_VAL                                                 'Date'
         32        DO_ICALL                                         $17     
         33        SEND_UNPACK                                              $17
         34        CHECK_UNDEF_ARGS                                         
         35        DO_ICALL                                                 
   60    36      > JMP                                                      ->26
         37    >   FE_FREE                                                  $16
   63    38        INIT_FCALL                                               'var_export'
         39        SEND_VAR                                                 !2
         40        DO_ICALL                                                 
   65    41        ECHO                                                     '%0A---%0A'
   67    42        ASSIGN                                                   !4, <array>
   68    43      > FE_RESET_R                                       $21     !0, ->55
         44    > > FE_FETCH_R                                               $21, !3, ->55
   69    45    > > FE_RESET_R                                       $22     !3, ->53
         46    > > FE_FETCH_R                                               $22, !5, ->53
   70    47    >   ARRAY_KEY_EXISTS                                         'Date', !5
         48      > JMPZ                                                     ~23, ->52
   71    49    >   FETCH_DIM_R                                      ~25     !5, 'Date'
         50        ASSIGN_DIM                                               !4
         51        OP_DATA                                                  ~25
   69    52    > > JMP                                                      ->46
         53    >   FE_FREE                                                  $22
   68    54      > JMP                                                      ->44
         55    >   FE_FREE                                                  $21
   75    56        INIT_FCALL                                               'var_export'
         57        SEND_VAR                                                 !4
         58        DO_ICALL                                                 
   76    59        ECHO                                                     '%0A---%0A'
   78    60        ASSIGN                                                   !6, <array>
   79    61      > FE_RESET_R                                       $28     !0, ->72
         62    > > FE_FETCH_R                                               $28, !3, ->72
   80    63    > > FE_RESET_R                                       $29     !3, ->70
         64    > > FE_FETCH_R                                               $29, $30, ->70
         65    >   FETCH_LIST_R                                     $31     $30, 'Date'
         66        ASSIGN_DIM                                               !6
         67        OP_DATA                                                  $31
         68        FREE                                                     $30
         69      > JMP                                                      ->64
         70    >   FE_FREE                                                  $29
   79    71      > JMP                                                      ->62
         72    >   FE_FREE                                                  $28
   82    73        INIT_FCALL                                               'var_export'
         74        SEND_VAR                                                 !6
         75        DO_ICALL                                                 
         76      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/bnRrP
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v, !1 = $k, !2 = $result1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   49     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   50     3        IS_IDENTICAL                                             !1, 'Date'
          4      > JMPZ                                                     ~3, ->7
   51     5    >   ASSIGN_DIM                                               !2
          6        OP_DATA                                                  !0
   53     7    > > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.57 ms | 1023 KiB | 18 Q