3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ ['2018-06-13' => "hadir"], ['2018-06-12' => "hadir"], ['2018-06-11' => "alfa"] ], [ ['2018-06-13' => "hadir"], ['2018-06-12' => "hadir"], ['2018-06-11' => "hadir"] ] ]; var_export( array_reduce( $array, function ($carry, $item) { $carry[] = array_merge(...$item); return $carry; }, [] ) ); echo "\n---\n"; foreach ($array as &$sub1) { $sub1 = array_merge(...$sub1); } var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
2 jumps found. (Code = 126) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/3jNft
function name:  (null)
number of ops:  24
compiled vars:  !0 = $array, !1 = $sub1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'var_export'
   16     2        INIT_FCALL                                               'array_reduce'
   17     3        SEND_VAR                                                 !0
   18     4        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   21     5        SEND_VAL                                                 ~3
   22     6        SEND_VAL                                                 <array>
   16     7        DO_ICALL                                         $4      
   22     8        SEND_VAR                                                 $4
   15     9        DO_ICALL                                                 
   26    10        ECHO                                                     '%0A---%0A'
   28    11      > FE_RESET_RW                                      $6      !0, ->19
         12    > > FE_FETCH_RW                                              $6, !1, ->19
   29    13    >   INIT_FCALL                                               'array_merge'
         14        SEND_UNPACK                                              !1
         15        CHECK_UNDEF_ARGS                                         
         16        DO_ICALL                                         $7      
         17        ASSIGN                                                   !1, $7
   28    18      > JMP                                                      ->12
         19    >   FE_FREE                                                  $6
   31    20        INIT_FCALL                                               'var_export'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
         23      > 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/3jNft
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $carry, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   19     2        INIT_FCALL                                               'array_merge'
          3        SEND_UNPACK                                              !1
          4        CHECK_UNDEF_ARGS                                         
          5        DO_ICALL                                         $3      
          6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  $3
   20     8      > RETURN                                                   !0
   21     9*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.62 ms | 1003 KiB | 16 Q