3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array( array( 'forename' => 'Foo', 'surname' => 'Bar' ), array( 'forename' => 'Bar', 'surname' => 'Foo' ) ); $arr = array(); foreach($items as $item){ $arr['name'][] = $item['forename']; $arr['surname'][] = $item['surname']; } echo "<pre>".print_r($arr, true)."</pre>"; foreach($arr as $value){ print_r($value); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 13
filename:       /in/ZdtFZ
function name:  (null)
number of ops:  29
compiled vars:  !0 = $items, !1 = $arr, !2 = $item, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   13     1        ASSIGN                                                   !1, <array>
   16     2      > FE_RESET_R                                       $6      !0, ->13
          3    > > FE_FETCH_R                                               $6, !2, ->13
   17     4    >   FETCH_DIM_R                                      ~9      !2, 'forename'
          5        FETCH_DIM_W                                      $7      !1, 'name'
          6        ASSIGN_DIM                                               $7
          7        OP_DATA                                                  ~9
   18     8        FETCH_DIM_R                                      ~12     !2, 'surname'
          9        FETCH_DIM_W                                      $10     !1, 'surname'
         10        ASSIGN_DIM                                               $10
         11        OP_DATA                                                  ~12
   16    12      > JMP                                                      ->3
         13    >   FE_FREE                                                  $6
   22    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !1
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $13     
         18        CONCAT                                           ~14     '%3Cpre%3E', $13
         19        CONCAT                                           ~15     ~14, '%3C%2Fpre%3E'
         20        ECHO                                                     ~15
   23    21      > FE_RESET_R                                       $16     !1, ->27
         22    > > FE_FETCH_R                                               $16, !3, ->27
   24    23    >   INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                                 
   23    26      > JMP                                                      ->22
         27    >   FE_FREE                                                  $16
   26    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.75 ms | 1396 KiB | 15 Q