3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hot = array( 'hotObj 1', 'hotObj 2', 'hotObj 3', 'hotObj 4', ); $new = array( 'newObj 1', 'newObj 2', ); $result = []; foreach ($hot as $key => &$value) { $value[] = $value; if(isset($new[$key])){ $value[] = $new[$key]; } } print_r($hot);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 126) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 14
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/D37gR
function name:  (null)
number of ops:  20
compiled vars:  !0 = $hot, !1 = $new, !2 = $result, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   14     2        ASSIGN                                                   !2, <array>
   15     3      > FE_RESET_RW                                      $8      !0, ->15
          4    > > FE_FETCH_RW                                      ~9      $8, !3, ->15
          5    >   ASSIGN                                                   !4, ~9
   16     6        QM_ASSIGN                                        ~12     !3
          7        ASSIGN_DIM                                               !3
          8        OP_DATA                                                  ~12
   17     9        ISSET_ISEMPTY_DIM_OBJ                         0          !1, !4
         10      > JMPZ                                                     ~13, ->14
   18    11    >   FETCH_DIM_R                                      ~15     !1, !4
         12        ASSIGN_DIM                                               !3
         13        OP_DATA                                                  ~15
   15    14    > > JMP                                                      ->4
         15    >   FE_FREE                                                  $8
   21    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.25 ms | 1395 KiB | 15 Q