3v4l.org

run code in 300+ PHP versions simultaneously
<?php $itemx= [ 'Weapons'=>[ 'Sword'=> [ 'ID' => '1', 'Name' => 'Lurker', 'Value' => '12', 'Made' => 'Acient' ], 'Shield'=> [ 'ID' => '2', 'Name' => 'Obi', 'Value' => '22', 'Made' => 'Acient' ], 'Warhammer'=> [ 'ID' => '3', 'Name' => 'Clotch', 'Value' => '124', 'Made' => 'Acient' ] ], 'Drinks'=>[ 'Water'=> [ 'ID' => '4', 'Name' => 'Clean-water', 'Value' => '1', 'Made' => 'Acient' ], 'Wine'=> [ 'ID' => '5', 'Name' => 'Soff', 'Value' => '5', 'Made' => 'Acient' ], 'Vodka'=> [ 'ID' => '6', 'Name' => 'Laudur', 'Value' => '7', 'Made' => 'Acient' ] ] ]; $id = 4; foreach ($itemx as $cat => $set) { foreach ($set as $sub => $row ) { if ($row['ID'] == $id) { var_export([$sub => $row]); break 2; } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 20
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 20
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 18
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 18
Branch analysis from position: 20
Branch analysis from position: 20
filename:       /in/eMRnQ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $itemx, !1 = $id, !2 = $set, !3 = $cat, !4 = $row, !5 = $sub
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   51     1        ASSIGN                                                   !1, 4
   52     2      > FE_RESET_R                                       $8      !0, ->20
          3    > > FE_FETCH_R                                       ~9      $8, !2, ->20
          4    >   ASSIGN                                                   !3, ~9
   53     5      > FE_RESET_R                                       $11     !2, ->18
          6    > > FE_FETCH_R                                       ~12     $11, !4, ->18
          7    >   ASSIGN                                                   !5, ~12
   54     8        FETCH_DIM_R                                      ~14     !4, 'ID'
          9        IS_EQUAL                                                 !1, ~14
         10      > JMPZ                                                     ~15, ->17
   55    11    >   INIT_FCALL                                               'var_export'
         12        INIT_ARRAY                                       ~16     !4, !5
         13        SEND_VAL                                                 ~16
         14        DO_ICALL                                                 
   56    15        FE_FREE                                                  $11
         16      > JMP                                                      ->20
   53    17    > > JMP                                                      ->6
         18    >   FE_FREE                                                  $11
   52    19      > JMP                                                      ->3
         20    >   FE_FREE                                                  $8
   59    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.84 ms | 1001 KiB | 14 Q