3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = 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' ) ) ); $dates = 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' ); foreach ($array as &$arr) { foreach (array_diff($dates, array_keys($arr)) as $date) { $arr[$date] = array('AVA_Id' => 0, 'AVA_Status' => 'no'); } ksort($arr); } print_r($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/a3EeJ
function name:  (null)
number of ops:  26
compiled vars:  !0 = $array, !1 = $dates, !2 = $arr, !3 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   30     1        ASSIGN                                                   !1, <array>
   40     2      > FE_RESET_RW                                      $6      !0, ->21
          3    > > FE_FETCH_RW                                              $6, !2, ->21
   41     4    >   INIT_FCALL                                               'array_diff'
          5        SEND_VAR                                                 !1
          6        INIT_FCALL                                               'array_keys'
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $7      
          9        SEND_VAR                                                 $7
         10        DO_ICALL                                         $8      
         11      > FE_RESET_R                                       $9      $8, ->16
         12    > > FE_FETCH_R                                               $9, !3, ->16
   42    13    >   ASSIGN_DIM                                               !2, !3
         14        OP_DATA                                                  <array>
   41    15      > JMP                                                      ->12
         16    >   FE_FREE                                                  $9
   44    17        INIT_FCALL                                               'ksort'
         18        SEND_REF                                                 !2
         19        DO_ICALL                                                 
   40    20      > JMP                                                      ->3
         21    >   FE_FREE                                                  $6
   47    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.14 ms | 1396 KiB | 21 Q