3v4l.org

run code in 300+ PHP versions simultaneously
<?php $newarray = array('489289', '536516', '332833', '536516'); $rockin = array( '489289' => array('536516','value1'), '332833' => array('536516'), ); foreach ($rockin as $array) { foreach ($array as $value) { if (in_array($value, $newarray)) { $newarray = array_diff($newarray, array($value)); break; } } } var_dump($newarray);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 19
Branch analysis from position: 19
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/8i4LE
function name:  (null)
number of ops:  26
compiled vars:  !0 = $newarray, !1 = $rockin, !2 = $array, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
   10     2      > FE_RESET_R                                       $6      !1, ->21
          3    > > FE_FETCH_R                                               $6, !2, ->21
   11     4    > > FE_RESET_R                                       $7      !2, ->19
          5    > > FE_FETCH_R                                               $7, !3, ->19
   12     6    >   INIT_FCALL                                               'in_array'
          7        SEND_VAR                                                 !3
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $8      
         10      > JMPZ                                                     $8, ->18
   13    11    >   INIT_FCALL                                               'array_diff'
         12        SEND_VAR                                                 !0
         13        INIT_ARRAY                                       ~9      !3
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !0, $10
   14    17      > JMP                                                      ->19
   11    18    > > JMP                                                      ->5
         19    >   FE_FREE                                                  $7
   10    20      > JMP                                                      ->3
         21    >   FE_FREE                                                  $6
   19    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.26 ms | 1388 KiB | 19 Q