3v4l.org

run code in 300+ PHP versions simultaneously
<?php $outer = array ( 47 => array ( '2019-02-24' => array ( 'AVA_Id' => 1, 'AVA_Status' => 'Open' ), '2019-02-25' => array ( 'AVA_Id' => 3, 'AVA_Status' => 'Open' ), '2019-02-28' => array ( 'AVA_Id' => 4, 'AVA_Status' => 'Close' ), ), 48 => array ( '2019-02-26' => array ( 'AVA_Id' => 2, 'AVA_Status' => 'Open' ) ) ); $daterange = array ( 0 => '2019-02-24', 1 => '2019-02-25', 2 => '2019-02-26', 3 => '2019-02-27', 4 => '2019-02-28', 5 => '2019-03-01', 6 => '2019-03-02' ); $template = array_fill_keys($daterange,['AVA_Id' => 0,'AVA_Status' => 'No']); foreach ($outer as $ind => $dates) { $output[$ind] = $template; foreach ($dates as $d => $v) { $output[$ind][$d] = $v; } } print_r($output);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 21
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 21
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 19
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/llvd0
function name:  (null)
number of ops:  26
compiled vars:  !0 = $outer, !1 = $daterange, !2 = $template, !3 = $dates, !4 = $ind, !5 = $output, !6 = $v, !7 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   30     1        ASSIGN                                                   !1, <array>
   40     2        INIT_FCALL                                               'array_fill_keys'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 <array>
          5        DO_ICALL                                         $10     
          6        ASSIGN                                                   !2, $10
   42     7      > FE_RESET_R                                       $12     !0, ->21
          8    > > FE_FETCH_R                                       ~13     $12, !3, ->21
          9    >   ASSIGN                                                   !4, ~13
   44    10        ASSIGN_DIM                                               !5, !4
         11        OP_DATA                                                  !2
   46    12      > FE_RESET_R                                       $16     !3, ->19
         13    > > FE_FETCH_R                                       ~17     $16, !6, ->19
         14    >   ASSIGN                                                   !7, ~17
   48    15        FETCH_DIM_W                                      $19     !5, !4
         16        ASSIGN_DIM                                               $19, !7
         17        OP_DATA                                                  !6
   46    18      > JMP                                                      ->13
         19    >   FE_FREE                                                  $16
   42    20      > JMP                                                      ->8
         21    >   FE_FREE                                                  $12
   53    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !5
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.63 ms | 1400 KiB | 17 Q