3v4l.org

run code in 300+ PHP versions simultaneously
<?php $accessible = array('title', 'description', 'category_ids'); $accessible = array_fill_keys($accessible, 0); $attributes = array('id' => 1, 'title' => 'Pippo', 'description' => 'Lollo', 'permalink' => 'ciao', 'author_id' => 3, 'category_ids' => array('ciao', 'come', 'va'), 'pippo' => null); print_r(array_intersect_key($attributes, $accessible)); print_r(array_diff_key($attributes, $accessible));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mktt2
function name:  (null)
number of ops:  22
compiled vars:  !0 = $accessible, !1 = $attributes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'array_fill_keys'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    4     6        ASSIGN                                                   !1, <array>
    6     7        INIT_FCALL                                               'print_r'
          8        INIT_FCALL                                               'array_intersect_key'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
    7    14        INIT_FCALL                                               'print_r'
         15        INIT_FCALL                                               'array_diff_key'
         16        SEND_VAR                                                 !1
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $8      
         19        SEND_VAR                                                 $8
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.36 ms | 1395 KiB | 21 Q