3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = array( array('fruit' => 'appel','color' => 'green'), array('fruit' => 'Banana','color' => 'Yellow'), array('fruit' => 'orange','color' => 'orange',) ); $new = array( array('fruit' => 'appel'), array('fruit' => 'orange') ); $arr = array(); $com = array_column($new, 'fruit'); foreach($original as $value){ if(!in_array($value['fruit'], $com)){ $arr[] = $value; } } print_r($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 20
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/XJfJ5
function name:  (null)
number of ops:  25
compiled vars:  !0 = $original, !1 = $new, !2 = $arr, !3 = $com, !4 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   14     2        ASSIGN                                                   !2, <array>
   15     3        INIT_FCALL                                               'array_column'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 'fruit'
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !3, $8
   16     8      > FE_RESET_R                                       $10     !0, ->20
          9    > > FE_FETCH_R                                               $10, !4, ->20
   17    10    >   INIT_FCALL                                               'in_array'
         11        FETCH_DIM_R                                      ~11     !4, 'fruit'
         12        SEND_VAL                                                 ~11
         13        SEND_VAR                                                 !3
         14        DO_ICALL                                         $12     
         15        BOOL_NOT                                         ~13     $12
         16      > JMPZ                                                     ~13, ->19
   18    17    >   ASSIGN_DIM                                               !2
         18        OP_DATA                                                  !4
   16    19    > > JMP                                                      ->9
         20    >   FE_FREE                                                  $10
   22    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.68 ms | 1395 KiB | 19 Q