3v4l.org

run code in 500+ PHP versions simultaneously
<?php $blacklist = [ (object)["id" => 22,"accessid" => 2, "utype_id" => 11, "discount" => 3434, "published" => 1], (object)["id" => 23,"accessid" => 2, "utype_id" => 14, "discount" => 2, "published" => 1] ]; $rows = [ (object)["id" => 9, "type_name" => "Admin", "description" => "admin", "published" => 0], (object)["id" => 10, "type_name" => "Senior sales", "description" => "senior sales", "published" => 0], (object)["id" => 11, "type_name" => "junior sales", "description" => "junior sales", "published" => 1], (object)["id" => 14, "type_name" => "dealer", "description" => "dealer", "published" => 0], (object)["id" => 15, "type_name" => "fgdg", "description" => "dfg", "published" => 1], (object)["id" => 16, "type_name" => "fgdfg", "description" => "fgdfg", "published" => 0] ]; foreach ($blacklist as $disqualifier) { // iterate the blacklist foreach ($rows as $index => $row) { // iterate the list to be checked if ($row->id === $disqualifier->utype_id) { // if row should be disqualified unset($rows[$index]); // remove the row break; // stop checking the $rows for this $disqualifier } } } var_export($rows);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 32
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 32
Branch analysis from position: 20
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 30
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 30
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 30
Branch analysis from position: 30
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/KE4QK
function name:  (null)
number of ops:  37
compiled vars:  !0 = $blacklist, !1 = $rows, !2 = $disqualifier, !3 = $row, !4 = $index
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   CAST                                              8  ~5      <array>
          1        INIT_ARRAY                                           ~6      ~5
          2        CAST                                              8  ~7      <array>
          3        ADD_ARRAY_ELEMENT                                    ~6      ~7
    2     4        ASSIGN                                                       !0, ~6
    8     5        CAST                                              8  ~9      <array>
          6        INIT_ARRAY                                           ~10     ~9
          7        CAST                                              8  ~11     <array>
          8        ADD_ARRAY_ELEMENT                                    ~10     ~11
          9        CAST                                              8  ~12     <array>
         10        ADD_ARRAY_ELEMENT                                    ~10     ~12
         11        CAST                                              8  ~13     <array>
         12        ADD_ARRAY_ELEMENT                                    ~10     ~13
         13        CAST                                              8  ~14     <array>
         14        ADD_ARRAY_ELEMENT                                    ~10     ~14
         15        CAST                                              8  ~15     <array>
         16        ADD_ARRAY_ELEMENT                                    ~10     ~15
    7    17        ASSIGN                                                       !1, ~10
   16    18      > FE_RESET_R                                           $17     !0, ->32
         19    > > FE_FETCH_R                                                   $17, !2, ->32
   17    20    > > FE_RESET_R                                           $18     !1, ->30
         21    > > FE_FETCH_R                                           ~19     $18, !3, ->30
         22    >   ASSIGN                                                       !4, ~19
   18    23        FETCH_OBJ_R                                          ~21     !3, 'id'
         24        FETCH_OBJ_R                                          ~22     !2, 'utype_id'
         25        IS_IDENTICAL                                                 ~21, ~22
         26      > JMPZ                                                         ~23, ->29
   19    27    >   UNSET_DIM                                                    !1, !4
   20    28      > JMP                                                          ->30
   17    29    > > JMP                                                          ->21
         30    >   FE_FREE                                                      $18
   16    31      > JMP                                                          ->19
         32    >   FE_FREE                                                      $17
   25    33        INIT_FCALL                                                   'var_export'
         34        SEND_VAR                                                     !1
         35        DO_ICALL                                                     
         36      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.9 ms | 2131 KiB | 13 Q