3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ 310 => 0, 311 => 0, 312 => 0, 313 => 0, 314 => 0, 315 => 0 ]; $array2 = [ "2019-05-17" => [ 312 => 3000.00 ], "2019-06-20" => [ 312 => 3000.00 ], "2019-06-27" => [ 313 => 5000.00, 315 => 3000.00 ] ]; foreach ($array2 as &$row) { $row += $array1; ksort($row); } var_export($array2);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/Q7Hjo
function name:  (null)
number of ops:  14
compiled vars:  !0 = $array1, !1 = $array2, !2 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, <array>
   25     2      > FE_RESET_RW                                      $5      !1, ->9
          3    > > FE_FETCH_RW                                              $5, !2, ->9
   26     4    >   ASSIGN_OP                                     1          !2, !0
   27     5        INIT_FCALL                                               'ksort'
          6        SEND_REF                                                 !2
          7        DO_ICALL                                                 
   25     8      > JMP                                                      ->3
          9    >   FE_FREE                                                  $5
   30    10        INIT_FCALL                                               'var_export'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.23 ms | 1010 KiB | 15 Q