3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 'status' => (object) (array( 'code' => 0, 'message' => 'Success', )), 'result' => array( 0 => (object) (array( 'base' => (object) (array( 'id' => 3, 'created' => '2012-11-11 12:11:07', 'start' => '2012-11-11', )), 'pos' => array( 0 => (object) (array( 'id' => 4, 'invoices_id' => 3, 'article_id' => 1, 'quantity' => 1, 'unit' => 'Monate', 'pos_txt' => 'Paketname', )), ), 'summ' => (object) (array( 'net' => '2.52', 'discount' => 0, 'tax' => '0.47899159663865', 'gross' => 3, 'rounded_net' => '2.52', )), )), 1 => (object) (array( 'base' => (object) (array( 'id' => 2, 'created' => '2012-11-11 12:10:39', 'start' => '2012-11-11', )), 'pos' => array( 0 => (object) (array( 'id' => 3, 'invoices_id' => 2, 'article_id' => 2, 'quantity' => 1, 'unit' => 'Monate', 'pos_txt' => 'Paketname2', )), ), 'summ' => (object) (array( 'net' => '5.04', 'discount' => 0, 'tax' => '0.95798319327731', 'gross' => 6, 'rounded_net' => '5.04', )), )), ), ); echo "<pre>"; foreach(array_map(function($v){ return $v->pos ;}, $data['result']) as $list) { foreach($list as $objPos) echo $objPos->pos_txt,PHP_EOL; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 30, Position 2 = 39
Branch analysis from position: 30
2 jumps found. (Code = 78) Position 1 = 31, Position 2 = 39
Branch analysis from position: 31
2 jumps found. (Code = 77) Position 1 = 32, Position 2 = 37
Branch analysis from position: 32
2 jumps found. (Code = 78) Position 1 = 33, Position 2 = 37
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 37
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/07B2Q
function name:  (null)
number of ops:  41
compiled vars:  !0 = $data, !1 = $list, !2 = $objPos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   CAST                                          8  ~3      <array>
          1        INIT_ARRAY                                       ~4      ~3, 'status'
   14     2        CAST                                          8  ~5      <array>
          3        INIT_ARRAY                                       ~6      ~5, 'base'
   21     4        CAST                                          8  ~7      <array>
          5        INIT_ARRAY                                       ~8      ~7, 0
          6        ADD_ARRAY_ELEMENT                                ~6      ~8, 'pos'
   31     7        CAST                                          8  ~9      <array>
          8        ADD_ARRAY_ELEMENT                                ~6      ~9, 'summ'
          9        CAST                                          8  ~10     ~6
         10        INIT_ARRAY                                       ~11     ~10, 0
   42    11        CAST                                          8  ~12     <array>
         12        INIT_ARRAY                                       ~13     ~12, 'base'
   49    13        CAST                                          8  ~14     <array>
         14        INIT_ARRAY                                       ~15     ~14, 0
         15        ADD_ARRAY_ELEMENT                                ~13     ~15, 'pos'
   59    16        CAST                                          8  ~16     <array>
         17        ADD_ARRAY_ELEMENT                                ~13     ~16, 'summ'
         18        CAST                                          8  ~17     ~13
         19        ADD_ARRAY_ELEMENT                                ~11     ~17, 1
         20        ADD_ARRAY_ELEMENT                                ~4      ~11, 'result'
    3    21        ASSIGN                                                   !0, ~4
   69    22        ECHO                                                     '%3Cpre%3E'
   70    23        INIT_FCALL                                               'array_map'
         24        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F07B2Q%3A70%240'
         25        SEND_VAL                                                 ~19
         26        FETCH_DIM_R                                      ~20     !0, 'result'
         27        SEND_VAL                                                 ~20
         28        DO_ICALL                                         $21     
         29      > FE_RESET_R                                       $22     $21, ->39
         30    > > FE_FETCH_R                                               $22, !1, ->39
   72    31    > > FE_RESET_R                                       $23     !1, ->37
         32    > > FE_FETCH_R                                               $23, !2, ->37
   73    33    >   FETCH_OBJ_R                                      ~24     !2, 'pos_txt'
         34        ECHO                                                     ~24
         35        ECHO                                                     '%0A'
   72    36      > JMP                                                      ->32
         37    >   FE_FREE                                                  $23
   70    38      > JMP                                                      ->30
         39    >   FE_FREE                                                  $22
   75    40      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F07B2Q%3A70%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/07B2Q
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   70     0  E >   RECV                                             !0      
          1        FETCH_OBJ_R                                      ~1      !0, 'pos'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F07B2Q%3A70%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.19 ms | 1400 KiB | 15 Q