3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.82 ms | 1395 KiB | 21 Q