3v4l.org

run code in 300+ PHP versions simultaneously
<?php $kams = array( array('id' => '1','name' => 'Helmut Gall'), array('id' => '2','name' => 'Norbert Kreier'), array('id' => '3','name' => 'Thilo Kurtz'), array('id' => '4','name' => 'Franz Engelhardt'), array('id' => '5','name' => 'Wolfgang Christmann'), array('id' => '6','name' => 'Johann Kerschensteiner'), array('id' => '7','name' => 'Daniel Roppelt'), array('id' => '8','name' => 'Klaus Markert'), array('id' => '9','name' => 'Ludwig Nagel'), array('id' => '10','name' => 'Peter Bohnacker') ); $kams1 = array(1,2,3,4,6,9,10); $diff=array(); foreach($kams as $kam) { if(!in_array($kam["id"],$kams1)) { $diff[]=$kam; } } print_r($diff); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 14
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/HM4jv
function name:  (null)
number of ops:  20
compiled vars:  !0 = $kams, !1 = $kams1, !2 = $diff, !3 = $kam
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, <array>
   17     2        ASSIGN                                                   !2, <array>
   18     3      > FE_RESET_R                                       $7      !0, ->15
          4    > > FE_FETCH_R                                               $7, !3, ->15
   20     5    >   INIT_FCALL                                               'in_array'
          6        FETCH_DIM_R                                      ~8      !3, 'id'
          7        SEND_VAL                                                 ~8
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $9      
         10        BOOL_NOT                                         ~10     $9
         11      > JMPZ                                                     ~10, ->14
   22    12    >   ASSIGN_DIM                                               !2
         13        OP_DATA                                                  !3
   18    14    > > JMP                                                      ->4
         15    >   FE_FREE                                                  $7
   25    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
   26    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.55 ms | 1395 KiB | 17 Q