3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ ["username" => "erick","location" => ["singapore"],"province" => ["jatim"]], ["username" => "thomas","location" => ["ukraina"],"province" => ["anonymouse"]] ]; $result = array_map(function ($arr) { return array_map(function($inner) { return is_array($inner) ? $inner[0] : $inner; }, $arr); }, $data); var_export($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eW8ci
function name:  (null)
number of ops:  11
compiled vars:  !0 = $data, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   12     3        SEND_VAL                                                 ~3
          4        SEND_VAR                                                 !0
    8     5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   14     7        INIT_FCALL                                               'var_export'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > 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/eW8ci
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
   11     3        SEND_VAL                                                 ~1
          4        SEND_VAR                                                 !0
    9     5        DO_ICALL                                         $2      
   11     6      > RETURN                                                   $2
   12     7*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eW8ci
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $inner
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~1, ->6
          3    >   FETCH_DIM_R                                      ~2      !0, 0
          4        QM_ASSIGN                                        ~3      ~2
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      !0
          7    > > RETURN                                                   ~3
   11     8*     > RETURN                                                   null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.99 ms | 1012 KiB | 15 Q