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, null, 'tabelle_mannschaft'); foreach ($array as &$row) { $row = $lookup[$row['tabelle_mannschaft']] ?? array_shift($subset); } var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 126) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/LUf2M
function name:  (null)
number of ops:  24
compiled vars:  !0 = $array, !1 = $subset, !2 = $lookup, !3 = $row
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                                                     null
          5        SEND_VAL                                                     'tabelle_mannschaft'
          6        DO_ICALL                                             $6      
          7        ASSIGN                                                       !2, $6
   16     8      > FE_RESET_RW                                          $8      !0, ->19
          9    > > FE_FETCH_RW                                                  $8, !3, ->19
   17    10    >   FETCH_DIM_R                                          ~9      !3, 'tabelle_mannschaft'
         11        FETCH_DIM_IS                                         ~10     !2, ~9
         12        COALESCE                                             ~11     ~10
         13        INIT_FCALL                                                   'array_shift'
         14        SEND_REF                                                     !1
         15        DO_ICALL                                             $12     
         16        QM_ASSIGN                                            ~11     $12
         17        ASSIGN                                                       !3, ~11
   16    18      > JMP                                                          ->9
         19    >   FE_FREE                                                      $8
   19    20        INIT_FCALL                                                   'var_export'
         21        SEND_VAR                                                     !0
         22        DO_ICALL                                                     
         23      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.28 ms | 1933 KiB | 16 Q