3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ ['id' => 14598, 'email_adr' => 'jos@pl.nuu', 'ad_owner_email' => 'boo@gmail.qom',], ['id' => 14598, 'email_adr' => 'boo@gmail.com', 'ad_owner_email' => 'jos@pl.nuu',], ['id' => 14598, 'email_adr' => 'boo@gmail.com', 'ad_owner_email' => 'pelle@med.nuu',], ]; foreach($arr as $key => $value) { if(isset($arr[$key+1])) { if ($value['email_adr'] == $arr[$key + 1]['ad_owner_email']) { unset($arr[$key]); } } } $arr = array_values($arr); echo '<pre>'; var_dump($arr); echo '</pre>';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 15
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 14
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/hEud7
function name:  (null)
number of ops:  26
compiled vars:  !0 = $arr, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1      > FE_RESET_R                                       $4      !0, ->15
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->15
          3    >   ASSIGN                                                   !2, ~5
   10     4        ADD                                              ~7      !2, 1
          5        ISSET_ISEMPTY_DIM_OBJ                         0          !0, ~7
          6      > JMPZ                                                     ~8, ->14
   11     7    >   FETCH_DIM_R                                      ~9      !1, 'email_adr'
          8        ADD                                              ~10     !2, 1
          9        FETCH_DIM_R                                      ~11     !0, ~10
         10        FETCH_DIM_R                                      ~12     ~11, 'ad_owner_email'
         11        IS_EQUAL                                                 ~9, ~12
         12      > JMPZ                                                     ~13, ->14
   12    13    >   UNSET_DIM                                                !0, !2
    9    14    > > JMP                                                      ->2
         15    >   FE_FREE                                                  $4
   17    16        INIT_FCALL                                               'array_values'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $14     
         19        ASSIGN                                                   !0, $14
   19    20        ECHO                                                     '%3Cpre%3E'
   20    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
   21    24        ECHO                                                     '%3C%2Fpre%3E'
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.88 ms | 1012 KiB | 15 Q