3v4l.org

run code in 300+ PHP versions simultaneously
<?php $aMbs = [ ['ID' => 1, 'Name' => 'Standard'], ['ID' => 2, 'Name' => 'Silver'], ['ID' => 3, 'Name' => 'Gold'], ['ID' => 4, 'Name' => 'Platinum'], ['ID' => 5, 'Name' => 'Unobtainium'], ]; $ignoreArray = [1, 3]; $aMemberships = []; foreach ($aMbs as ['ID' => $id, 'Name' => $name]) { if (!in_array($id, $ignoreArray)) { $aMemberships[$id] = $name; } } var_export($aMemberships);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 18
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/VJPjv
function name:  (null)
number of ops:  24
compiled vars:  !0 = $aMbs, !1 = $ignoreArray, !2 = $aMemberships, !3 = $id, !4 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   12     2        ASSIGN                                                   !2, <array>
   13     3      > FE_RESET_R                                       $8      !0, ->19
          4    > > FE_FETCH_R                                               $8, $9, ->19
          5    >   FETCH_LIST_R                                     $10     $9, 'ID'
          6        ASSIGN                                                   !3, $10
          7        FETCH_LIST_R                                     $12     $9, 'Name'
          8        ASSIGN                                                   !4, $12
          9        FREE                                                     $9
   14    10        INIT_FCALL                                               'in_array'
         11        SEND_VAR                                                 !3
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $14     
         14        BOOL_NOT                                         ~15     $14
         15      > JMPZ                                                     ~15, ->18
   15    16    >   ASSIGN_DIM                                               !2, !3
         17        OP_DATA                                                  !4
   13    18    > > JMP                                                      ->4
         19    >   FE_FREE                                                  $8
   18    20        INIT_FCALL                                               'var_export'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
133.29 ms | 1011 KiB | 15 Q