3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [ "Twitter", "Facebook", ], [ "rey", "ray lard", ], ]; $arr = array_map(function($item){ return [$item[0] => $item[1]];},array_map(null, ...$arr)); echo json_encode($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NVg2N
function name:  (null)
number of ops:  17
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNVg2N%3A11%240'
          3        SEND_VAL                                                 ~2
          4        INIT_FCALL                                               'array_map'
          5        SEND_VAL                                                 null
          6        SEND_UNPACK                                              !0
          7        CHECK_UNDEF_ARGS                                         
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !0, $4
   12    12        INIT_FCALL                                               'json_encode'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15        ECHO                                                     $6
         16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNVg2N%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NVg2N
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        FETCH_DIM_R                                      ~1      !0, 0
          2        FETCH_DIM_R                                      ~2      !0, 1
          3        INIT_ARRAY                                       ~3      ~2, ~1
          4      > RETURN                                                   ~3
          5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNVg2N%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.36 ms | 1395 KiB | 17 Q