3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputs = [ 'set1' => [ 'key1' => 'value1', 'key2' => 'value2' ], 'set3' => [ 'key1' => 'value1114', 'key2' => 'value2224' ], 'set2' => [ 'key1' => 'value111', 'key2' => 'value222' ], ]; $outputs = [ 'out2' => [ 'key1' => 'value11', 'key2' => 'value22', 'key3' => 'value33', 'key4' => 'value44', 'key5' => 'value55', 'key6' => 'value66', ], 'out3' => [ 'key1' => 'value111', 'key2' => 'value222', 'key3' => 'value333', 'key4' => 'value444', 'key5' => 'value555', 'key6' => 'value666', ] ]; $inputs2 = [ 'from' => [ 'postalCode' => '1234AB', 'houseNumber' => '11', ], 'to' => [ 'postalCode' => '5678CC', 'houseNumber' => '21', ] ]; $outputs2 = [ '51cb9c71491c4bd4b8bc05dc7f3fca86' => [ 'postalCode' => '1234AB', 'houseNumber' => '11', ], 'd0179cd2ddd5436da9785c76cce4320c' => [ 'postalCode' => '5678CC', 'houseNumber' => '22', ] ]; foreach($outputs2 as $key => $value) { foreach($inputs2 as $input => $values) { if (array_intersect($value, $values) == $values) { $result[$key] = $value; unset($notIn[$input]); } else { $notIn[$input] = $values; } } } var_dump($notIn); var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 25
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 25
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 23
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 23
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 23
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/YBNKg
function name:  (null)
number of ops:  33
compiled vars:  !0 = $inputs, !1 = $outputs, !2 = $inputs2, !3 = $outputs2, !4 = $value, !5 = $key, !6 = $values, !7 = $input, !8 = $result, !9 = $notIn
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   21     1        ASSIGN                                                   !1, <array>
   42     2        ASSIGN                                                   !2, <array>
   55     3        ASSIGN                                                   !3, <array>
   69     4      > FE_RESET_R                                       $14     !3, ->25
          5    > > FE_FETCH_R                                       ~15     $14, !4, ->25
          6    >   ASSIGN                                                   !5, ~15
   70     7      > FE_RESET_R                                       $17     !2, ->23
          8    > > FE_FETCH_R                                       ~18     $17, !6, ->23
          9    >   ASSIGN                                                   !7, ~18
   71    10        INIT_FCALL                                               'array_intersect'
         11        SEND_VAR                                                 !4
         12        SEND_VAR                                                 !6
         13        DO_ICALL                                         $20     
         14        IS_EQUAL                                                 !6, $20
         15      > JMPZ                                                     ~21, ->20
   72    16    >   ASSIGN_DIM                                               !8, !5
         17        OP_DATA                                                  !4
   73    18        UNSET_DIM                                                !9, !7
         19      > JMP                                                      ->22
   75    20    >   ASSIGN_DIM                                               !9, !7
         21        OP_DATA                                                  !6
   70    22    > > JMP                                                      ->8
         23    >   FE_FREE                                                  $17
   69    24      > JMP                                                      ->5
         25    >   FE_FREE                                                  $14
   81    26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !9
         28        DO_ICALL                                                 
   82    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !8
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.26 ms | 941 KiB | 18 Q