3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'index1' => 'Deleted', 'index2' => 'numbers', 'index3' => 'test', 'index4' => 'Inserted', ); $specificIndex = array('index1', 'index3'); $array1 = array_diff_key($array, array_flip($specificIndex)); $array2 = array_diff($array, $array1); var_dump($array1, $array2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6rR04
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array, !1 = $specificIndex, !2 = $array1, !3 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   11     2        INIT_FCALL                                               'array_diff_key'
          3        SEND_VAR                                                 !0
          4        INIT_FCALL                                               'array_flip'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $6      
          7        SEND_VAR                                                 $6
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
   12    10        INIT_FCALL                                               'array_diff'
         11        SEND_VAR                                                 !0
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $9      
         14        ASSIGN                                                   !3, $9
   14    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !2
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.4 ms | 1002 KiB | 17 Q