3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'dates' => array('2013-04-22','2013-04-23'), 'publisherName' => array('Comp1', 'Comp2'), 'loaded' => array(2189, 37), 'clicks' => array(0, 0), 'ctr' => array(0, 0) ); $dates = array_shift($array); $output = array(); foreach ($array as $k => $a) { foreach ($a as $i => $v) { $output[$i][$k] = $v; } } $example = array_combine($dates, $output); var_dump($example);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 18
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 16
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/qNnVb
function name:  (null)
number of ops:  28
compiled vars:  !0 = $array, !1 = $dates, !2 = $output, !3 = $a, !4 = $k, !5 = $v, !6 = $i, !7 = $example
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'array_shift'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                         $9      
          4        ASSIGN                                                   !1, $9
   12     5        ASSIGN                                                   !2, <array>
   13     6      > FE_RESET_R                                       $12     !0, ->18
          7    > > FE_FETCH_R                                       ~13     $12, !3, ->18
          8    >   ASSIGN                                                   !4, ~13
   14     9      > FE_RESET_R                                       $15     !3, ->16
         10    > > FE_FETCH_R                                       ~16     $15, !5, ->16
         11    >   ASSIGN                                                   !6, ~16
   15    12        FETCH_DIM_W                                      $18     !2, !6
         13        ASSIGN_DIM                                               $18, !4
         14        OP_DATA                                                  !5
   14    15      > JMP                                                      ->10
         16    >   FE_FREE                                                  $15
   13    17      > JMP                                                      ->7
         18    >   FE_FREE                                                  $12
   18    19        INIT_FCALL                                               'array_combine'
         20        SEND_VAR                                                 !1
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $20     
         23        ASSIGN                                                   !7, $20
   20    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !7
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.22 ms | 1396 KiB | 19 Q