3v4l.org

run code in 300+ PHP versions simultaneously
<?php $format = function($map, $tmp){ $formated = array(); foreach($map as $day => $reg){ $formated[$day][$reg['HORA']] = $reg; } return $formated; }; $result = array_map(array_merge_recursive( array( '2015-01-01' => array(array('HORA' => '0600', 'MOTIVO' => 'teste')), '2015-01-02' => array(array('HORA' => '0600', 'MOTIVO' => 'teste'),array('HORA' => '0700', 'MOTIVO' => 'teste')), '2015-01-03' => array(array('HORA' => '0600', 'MOTIVO' => 'demo')) ), array( '2015-01-01' => array(array('HORA' => '0600', 'MOTIVO' => 'teste')), '2015-01-02' => array(array('HORA' => '0800', 'MOTIVO' => 'teste')), '2015-01-03' => array(array('HORA' => '0800', 'MOTIVO' => 'demo')) ) )); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/knq3d
function name:  (null)
number of ops:  14
compiled vars:  !0 = $format, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fknq3d%3A2%240'
          1        ASSIGN                                                   !0, ~2
    9     2        INIT_FCALL                                               'array_map'
          3        INIT_FCALL                                               'array_merge_recursive'
   11     4        SEND_VAL                                                 <array>
   16     5        SEND_VAL                                                 <array>
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
    9     9        ASSIGN                                                   !1, $5
   21    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fknq3d%3A2%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/knq3d
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $map, !1 = $tmp, !2 = $formated, !3 = $reg, !4 = $day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        ASSIGN                                                   !2, <array>
    4     3      > FE_RESET_R                                       $6      !0, ->11
          4    > > FE_FETCH_R                                       ~7      $6, !3, ->11
          5    >   ASSIGN                                                   !4, ~7
    5     6        FETCH_DIM_R                                      ~10     !3, 'HORA'
          7        FETCH_DIM_W                                      $9      !2, !4
          8        ASSIGN_DIM                                               $9, ~10
          9        OP_DATA                                                  !3
    4    10      > JMP                                                      ->4
         11    >   FE_FREE                                                  $6
    7    12      > RETURN                                                   !2
    8    13*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fknq3d%3A2%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.55 ms | 1396 KiB | 19 Q