3v4l.org

run code in 300+ PHP versions simultaneously
<?php $accessible = array('title', 'description', 'category_ids'); $accessible = array_fill_keys($accessible, 0); print_r($accessible); return; $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/C3Bov
function name:  (null)
number of ops:  26
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
    5     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    6     9      > RETURN                                                   null
    8    10*       ASSIGN                                                   !1, <array>
   10    11*       INIT_FCALL                                               'print_r'
         12*       INIT_FCALL                                               'array_intersect_key'
         13*       SEND_VAR                                                 !1
         14*       SEND_VAR                                                 !0
         15*       DO_ICALL                                         $7      
         16*       SEND_VAR                                                 $7
         17*       DO_ICALL                                                 
   11    18*       INIT_FCALL                                               'print_r'
         19*       INIT_FCALL                                               'array_diff_key'
         20*       SEND_VAR                                                 !1
         21*       SEND_VAR                                                 !0
         22*       DO_ICALL                                         $9      
         23*       SEND_VAR                                                 $9
         24*       DO_ICALL                                                 
         25*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.46 ms | 1395 KiB | 21 Q