3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array1 = [ (object)["id" => 22,"accessid" => 2, "utype_id" => 11, "discount" => 3434, "published" => 1], (object)["id" => 23,"accessid" => 2, "utype_id" => 14, "discount" => 2, "published" => 1] ]; $array2 = [ (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] ]; $utype_ids = []; foreach ($array1 as $item) { $utype_ids[$item->utype_id] = 1; } var_export(array_filter( $array2, function($v) use ($utype_ids) { return !isset($utype_ids[$v->id]); } ));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/i2heV
function name:  (null)
number of ops:  36
compiled vars:  !0 = $array1, !1 = $array2, !2 = $utype_ids, !3 = $item
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   CAST                                              8  ~4      <array>
          1        INIT_ARRAY                                           ~5      ~4
          2        CAST                                              8  ~6      <array>
          3        ADD_ARRAY_ELEMENT                                    ~5      ~6
    2     4        ASSIGN                                                       !0, ~5
    8     5        CAST                                              8  ~8      <array>
          6        INIT_ARRAY                                           ~9      ~8
          7        CAST                                              8  ~10     <array>
          8        ADD_ARRAY_ELEMENT                                    ~9      ~10
          9        CAST                                              8  ~11     <array>
         10        ADD_ARRAY_ELEMENT                                    ~9      ~11
         11        CAST                                              8  ~12     <array>
         12        ADD_ARRAY_ELEMENT                                    ~9      ~12
         13        CAST                                              8  ~13     <array>
         14        ADD_ARRAY_ELEMENT                                    ~9      ~13
         15        CAST                                              8  ~14     <array>
         16        ADD_ARRAY_ELEMENT                                    ~9      ~14
    7    17        ASSIGN                                                       !1, ~9
   16    18        ASSIGN                                                       !2, <array>
   17    19      > FE_RESET_R                                           $17     !0, ->25
         20    > > FE_FETCH_R                                                   $17, !3, ->25
   18    21    >   FETCH_OBJ_R                                          ~18     !3, 'utype_id'
         22        ASSIGN_DIM                                                   !2, ~18
         23        OP_DATA                                                      1
   17    24      > JMP                                                          ->20
         25    >   FE_FREE                                                      $17
   21    26        INIT_FCALL                                                   'var_export'
         27        INIT_FCALL                                                   'array_filter'
   22    28        SEND_VAR                                                     !1
   23    29        DECLARE_LAMBDA_FUNCTION                              ~20     [0]
         30        BIND_LEXICAL                                                 ~20, !2
   25    31        SEND_VAL                                                     ~20
   21    32        DO_ICALL                                             $21     
   25    33        SEND_VAR                                                     $21
   21    34        DO_ICALL                                                     
   26    35      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i2heV
function name:  {closure:/in/i2heV:23}
number of ops:  7
compiled vars:  !0 = $v, !1 = $utype_ids
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
   24     2        FETCH_OBJ_R                                          ~2      !0, 'id'
          3        ISSET_ISEMPTY_DIM_OBJ                             0  ~3      !1, ~2
          4        BOOL_NOT                                             ~4      ~3
          5      > RETURN                                                       ~4
   25     6*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
213.63 ms | 2117 KiB | 15 Q