3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ ['ID' => 1], ['ID' => 2], ['ID' => 3], ['ID' => 4], ['ID' => 5], ]; $array2 = [ ['ID' => 2, 'NUM' => 200], ['ID' => 4, 'NUM' => 400], ]; foreach ($array1 as ['ID' => $id, 'NUM' => &$ref[$id]]) { $ref[$id] = 0; } foreach ($array2 as ['ID' => $id, 'NUM' => $ref[$id]]); var_export($array1);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 24
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 14
filename:       /in/OKmYh
function name:  (null)
number of ops:  29
compiled vars:  !0 = $array1, !1 = $array2, !2 = $id, !3 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   15     2      > FE_RESET_RW                                      $6      !0, ->14
          3    > > FE_FETCH_RW                                              $6, $7, ->14
          4    >   FETCH_LIST_R                                     $8      $7, 'ID'
          5        ASSIGN                                                   !2, $8
          6        FETCH_LIST_W                                     $10     $7, 'NUM'
          7        MAKE_REF                                         $11     $10
          8        FETCH_DIM_W                                      $12     !3, !2
          9        ASSIGN_REF                                               $12, $11
         10        FREE                                                     $7
   16    11        ASSIGN_DIM                                               !3, !2
         12        OP_DATA                                                  0
   15    13      > JMP                                                      ->3
         14    >   FE_FREE                                                  $6
   18    15      > FE_RESET_R                                       $15     !1, ->24
         16    > > FE_FETCH_R                                               $15, $16, ->24
         17    >   FETCH_LIST_R                                     $17     $16, 'ID'
         18        ASSIGN                                                   !2, $17
         19        FETCH_LIST_R                                     $19     $16, 'NUM'
         20        ASSIGN_DIM                                               !3, !2
         21        OP_DATA                                                  $19
         22        FREE                                                     $16
         23      > JMP                                                      ->16
         24    >   FE_FREE                                                  $15
   20    25        INIT_FCALL                                               'var_export'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.27 ms | 998 KiB | 14 Q