3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ ['tabelle_mannschaft' => 'SV Winter'], ['tabelle_mannschaft' => 'Mannschaft 7'], ['tabelle_mannschaft' => 'TSV HORIZONT'], ['tabelle_mannschaft' => 'Mannschaft 8'], ]; $subset = [ ['tabelle_mannschaft' => 'TSV HORIZONT'], ['tabelle_mannschaft' => 'Mannschaft 7'], ]; $lookup = array_column($subset, 'tabelle_mannschaft', 'tabelle_mannschaft'); foreach ($array as $i => $row) { if (isset($lookup[$row['tabelle_mannschaft']])) { $array[$i] = array_shift($subset); } } var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 20
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/MEMMY
function name:  (null)
number of ops:  25
compiled vars:  !0 = $array, !1 = $subset, !2 = $lookup, !3 = $row, !4 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   10     1        ASSIGN                                                       !1, <array>
   15     2        INIT_FCALL                                                   'array_column'
          3        SEND_VAR                                                     !1
          4        SEND_VAL                                                     'tabelle_mannschaft'
          5        SEND_VAL                                                     'tabelle_mannschaft'
          6        DO_ICALL                                             $7      
          7        ASSIGN                                                       !2, $7
   16     8      > FE_RESET_R                                           $9      !0, ->20
          9    > > FE_FETCH_R                                           ~10     $9, !3, ->20
         10    >   ASSIGN                                                       !4, ~10
   17    11        FETCH_DIM_R                                          ~12     !3, 'tabelle_mannschaft'
         12        ISSET_ISEMPTY_DIM_OBJ                             0          !2, ~12
         13      > JMPZ                                                         ~13, ->19
   18    14    >   INIT_FCALL                                                   'array_shift'
         15        SEND_REF                                                     !1
         16        DO_ICALL                                             $15     
         17        ASSIGN_DIM                                                   !0, !4
         18        OP_DATA                                                      $15
   16    19    > > JMP                                                          ->9
         20    >   FE_FREE                                                      $9
   21    21        INIT_FCALL                                                   'var_export'
         22        SEND_VAR                                                     !0
         23        DO_ICALL                                                     
         24      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.47 ms | 1933 KiB | 16 Q