3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'title' => array( "ABC", "DEF", "GHI" ), "url" => array( "abc", "def", "ghi" ) ); $keys = array_keys($arr); $count = count($arr[$keys[0]]); For($i=0; $i<$count; $i++){ Foreach($keys as $key){ $res[$i][$key] = $arr[$key][$i]; } } Var_dump($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
Branch analysis from position: 11
Branch analysis from position: 19
filename:       /in/41PNh
function name:  (null)
number of ops:  27
compiled vars:  !0 = $arr, !1 = $keys, !2 = $count, !3 = $i, !4 = $key, !5 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   16     1        INIT_FCALL                                               'array_keys'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
   17     5        FETCH_DIM_R                                      ~9      !1, 0
          6        FETCH_DIM_R                                      ~10     !0, ~9
          7        COUNT                                            ~11     ~10
          8        ASSIGN                                                   !2, ~11
   19     9        ASSIGN                                                   !3, 0
         10      > JMP                                                      ->21
   20    11    > > FE_RESET_R                                       $14     !1, ->19
         12    > > FE_FETCH_R                                               $14, !4, ->19
   21    13    >   FETCH_DIM_R                                      ~17     !0, !4
         14        FETCH_DIM_R                                      ~18     ~17, !3
         15        FETCH_DIM_W                                      $15     !5, !3
         16        ASSIGN_DIM                                               $15, !4
         17        OP_DATA                                                  ~18
   20    18      > JMP                                                      ->12
         19    >   FE_FREE                                                  $14
   19    20        PRE_INC                                                  !3
         21    >   IS_SMALLER                                               !3, !2
         22      > JMPNZ                                                    ~20, ->11
   25    23    >   INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !5
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.56 ms | 1007 KiB | 15 Q