3v4l.org

run code in 300+ PHP versions simultaneously
<?php $records = array( array( 'id' => 2135, 'first_name' => 'John', 'last_name' => 'Doe', ), array( 'id' => 3245, 'first_name' => 'Sally', 'last_name' => 'Smith', ), array( 'id' => 5342, 'first_name' => 'Jane', 'last_name' => 'Jones', ), array( 'id' => 5623, 'first_name' => 'Peter', 'last_name' => 'Doe', ) ); echo "<pre>"; $arr_output = array(); foreach($records as $key=>$arr) { $arr_output['id'][] = $arr['id']; $arr_output['first_name'][] = $arr['first_name']; $arr_output['last_name'][] = $arr['last_name']; } print_r($arr_output);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/Y830q
function name:  (null)
number of ops:  24
compiled vars:  !0 = $records, !1 = $arr_output, !2 = $arr, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    5     1        ECHO                                                     '%3Cpre%3E'
    7     2        ASSIGN                                                   !1, <array>
    8     3      > FE_RESET_R                                       $6      !0, ->19
          4    > > FE_FETCH_R                                       ~7      $6, !2, ->19
          5    >   ASSIGN                                                   !3, ~7
   10     6        FETCH_DIM_R                                      ~11     !2, 'id'
          7        FETCH_DIM_W                                      $9      !1, 'id'
          8        ASSIGN_DIM                                               $9
          9        OP_DATA                                                  ~11
   11    10        FETCH_DIM_R                                      ~14     !2, 'first_name'
         11        FETCH_DIM_W                                      $12     !1, 'first_name'
         12        ASSIGN_DIM                                               $12
         13        OP_DATA                                                  ~14
   12    14        FETCH_DIM_R                                      ~17     !2, 'last_name'
         15        FETCH_DIM_W                                      $15     !1, 'last_name'
         16        ASSIGN_DIM                                               $15
         17        OP_DATA                                                  ~17
    8    18      > JMP                                                      ->4
         19    >   FE_FREE                                                  $6
   15    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.67 ms | 1387 KiB | 15 Q