3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = ['one' => 1, 'two' => 2, 'three' => 3]; $keys =['one', 'two', 'three']; $merged = array_diff(array_count_values(array_merge($keys, array_keys($arr))), [2]); var_dump($merged);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ATSHF
function name:  (null)
number of ops:  21
compiled vars:  !0 = $arr, !1 = $keys, !2 = $merged
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, <array>
    6     2        INIT_FCALL                                                   'array_diff'
          3        INIT_FCALL                                                   'array_count_values'
          4        INIT_FCALL                                                   'array_merge'
          5        SEND_VAR                                                     !1
          6        INIT_FCALL                                                   'array_keys'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                             $5      
          9        SEND_VAR                                                     $5
         10        DO_ICALL                                             $6      
         11        SEND_VAR                                                     $6
         12        DO_ICALL                                             $7      
         13        SEND_VAR                                                     $7
         14        SEND_VAL                                                     <array>
         15        DO_ICALL                                             $8      
         16        ASSIGN                                                       !2, $8
    8    17        INIT_FCALL                                                   'var_dump'
         18        SEND_VAR                                                     !2
         19        DO_ICALL                                                     
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.08 ms | 2040 KiB | 18 Q