3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array("Habie" => [ "2019-06-30" => ["duration" => "4 Hour", "status" => "Less"], "2019-06-26" => ["duration" => "11 Hour", "status" => "More"], "total" => "15 Hour"], "Budiman" => [ "2019-06-28" => ["duration" => "4 Hour", "status" => "Less"], "2019-06-25" => ["duration" => "3 Hour", "status" => "Less"], "total" => "7 Hour"] ); $dates = ["2019-06-30", "2019-06-29", "2019-06-28", "2019-06-27", "2019-06-26", "2019-06-25", "2019-06-24"]; $template = array_map(function ($e) {return [];}, array_flip($dates)); foreach($arr as $k => &$v) $v = array_merge($template, $v); print_r($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 126) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/Ol4ga
function name:  (null)
number of ops:  25
compiled vars:  !0 = $arr, !1 = $dates, !2 = $template, !3 = $v, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, <array>
   17     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                          ~7      [0]
          4        SEND_VAL                                                 ~7
          5        INIT_FCALL                                               'array_flip'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $8      
          8        SEND_VAR                                                 $8
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !2, $9
   18    11      > FE_RESET_RW                                      $11     !0, ->20
         12    > > FE_FETCH_RW                                      ~12     $11, !3, ->20
         13    >   ASSIGN                                                   !4, ~12
   19    14        INIT_FCALL                                               'array_merge'
         15        SEND_VAR                                                 !2
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $14     
         18        ASSIGN                                                   !3, $14
   18    19      > JMP                                                      ->12
         20    >   FE_FREE                                                  $11
   21    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
         24      > 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/Ol4ga
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1      > RETURN                                                   <array>
          2*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.57 ms | 1009 KiB | 17 Q