3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = [ 'name' => [ (int) 0 => '095a108478345cac184f956b1e8dee91a5a89f87bbabd7b3fb4058f577adf.jpg', (int) 1 => '02059.jpg', (int) 2 => 'avatar.jpg' ], 'type' => [ (int) 0 => 'image/jpeg', (int) 1 => 'image/jpeg', (int) 2 => 'image/jpeg' ], 'tmp_name' => [ (int) 0 => 'C:\xampp\tmp\php17AA.tmp', (int) 1 => 'C:\xampp\tmp\php17BA.tmp', (int) 2 => 'C:\xampp\tmp\php17BB.tmp' ], 'error' => [ (int) 0 => (int) 0, (int) 1 => (int) 0, (int) 2 => (int) 0 ], 'size' => [ (int) 0 => (int) 80542, (int) 1 => (int) 6532, (int) 2 => (int) 6879 ] ]; $ret = []; $keys = array_keys($data); for ($i=0; $i<3; $i++) { $ret[$i] = array_combine($keys, array_map(function($element) use ($i){ return $element[$i]; }, $data)); } var_dump($ret);
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 = 8
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 8
Branch analysis from position: 23
Branch analysis from position: 8
filename:       /in/hoLNd
function name:  (null)
number of ops:  27
compiled vars:  !0 = $data, !1 = $ret, !2 = $keys, !3 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, <array>
   32     1        ASSIGN                                                       !1, <array>
          2        INIT_FCALL                                                   'array_keys'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $6      
          5        ASSIGN                                                       !2, $6
   33     6        ASSIGN                                                       !3, 0
          7      > JMP                                                          ->21
   34     8    >   INIT_FCALL                                                   'array_combine'
          9        SEND_VAR                                                     !2
         10        INIT_FCALL                                                   'array_map'
         11        DECLARE_LAMBDA_FUNCTION                              ~10     [0]
         12        BIND_LEXICAL                                                 ~10, !3
   36    13        SEND_VAL                                                     ~10
         14        SEND_VAR                                                     !0
   34    15        DO_ICALL                                             $11     
   36    16        SEND_VAR                                                     $11
   34    17        DO_ICALL                                             $12     
         18        ASSIGN_DIM                                                   !1, !3
   36    19        OP_DATA                                                      $12
   33    20        PRE_INC                                                      !3
         21    >   IS_SMALLER                                                   !3, 3
         22      > JMPNZ                                                        ~14, ->8
   39    23    >   INIT_FCALL                                                   'var_dump'
         24        SEND_VAR                                                     !1
         25        DO_ICALL                                                     
         26      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hoLNd
function name:  {closure:/in/hoLNd:34}
number of ops:  5
compiled vars:  !0 = $element, !1 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   34     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
   35     2        FETCH_DIM_R                                          ~2      !0, !1
          3      > RETURN                                                       ~2
   36     4*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.53 ms | 2936 KiB | 17 Q