3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array ( '2019-04-29' => array ( 0 => 366, 1 => 82, 2 => 44 ), '2019-04-30' => array ( 0 => 330, 1 => 115, 2 => 55 ) ); $array2 = array(492, 500); $array1 = array_values($array1); foreach ($array2 as $k => &$v) { $v = array_merge(array($v), $array1[$k]); } print_r($array2);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
2 jumps found. (Code = 126) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/nIpr3
function name:  (null)
number of ops:  22
compiled vars:  !0 = $array1, !1 = $array2, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   17     1        ASSIGN                                                   !1, <array>
   18     2        INIT_FCALL                                               'array_values'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !0, $6
   19     6      > FE_RESET_RW                                      $8      !1, ->17
          7    > > FE_FETCH_RW                                      ~9      $8, !2, ->17
          8    >   ASSIGN                                                   !3, ~9
   20     9        INIT_FCALL                                               'array_merge'
         10        INIT_ARRAY                                       ~11     !2
         11        SEND_VAL                                                 ~11
         12        FETCH_DIM_R                                      ~12     !0, !3
         13        SEND_VAL                                                 ~12
         14        DO_ICALL                                         $13     
         15        ASSIGN                                                   !2, $13
   19    16      > JMP                                                      ->7
         17    >   FE_FREE                                                  $8
   22    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.85 ms | 1395 KiB | 19 Q