3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source=array('contract' => array( 0 => '6', 1 => '6', 2 => '6'), 'folder_id' => array( 0 => '1', 1 => '1', 2 => '1'), 'service' => array( 0 => '2', 1 => '2', 2 => '2'), 'value' => array( 0 => '12', 1 => '12', 2 => '66'), 'currency_id' => array( 0 => '6' , 1 => '9' , 2 => '6')); print_r($source);//just to compare $result=array(); array_walk($source,function($val,$key)use(&$result){ foreach($val as $k=>$v){ $result[$k][$key]=$v; } }); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fVBp4
function name:  (null)
number of ops:  15
compiled vars:  !0 = $source, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    4     4        ASSIGN                                                   !1, <array>
    5     5        INIT_FCALL                                               'array_walk'
          6        SEND_REF                                                 !0
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FfVBp4%3A5%240'
          8        BIND_LEXICAL                                             ~5, !1
    9     9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
   10    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FfVBp4%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/fVBp4
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $val, !1 = $key, !2 = $result, !3 = $v, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
    6     3      > FE_RESET_R                                       $5      !0, ->10
          4    > > FE_FETCH_R                                       ~6      $5, !3, ->10
          5    >   ASSIGN                                                   !4, ~6
    7     6        FETCH_DIM_W                                      $8      !2, !4
          7        ASSIGN_DIM                                               $8, !1
          8        OP_DATA                                                  !3
    6     9      > JMP                                                      ->4
         10    >   FE_FREE                                                  $5
    9    11      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FfVBp4%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.47 ms | 1396 KiB | 17 Q