3v4l.org

run code in 300+ PHP versions simultaneously
<?php $profileSubscriptions = ['one' => false, 'two' => true]; $lookup = ['one' => 'subscription', 'two' => 'marketing']; $subscriptions = array_filter($profileSubscriptions); $lists = array_filter(array_intersect_key($lookup, $subscriptions)); $diff = array_diff_key($subscriptions, $lists); echo 'Subscriptions do not exist for ' . implode(', ', $diff); var_dump(array_values($lists));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iolub
function name:  (null)
number of ops:  32
compiled vars:  !0 = $profileSubscriptions, !1 = $lookup, !2 = $subscriptions, !3 = $lists, !4 = $diff
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_filter'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !2, $7
    7     6        INIT_FCALL                                               'array_filter'
          7        INIT_FCALL                                               'array_intersect_key'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $9      
         11        SEND_VAR                                                 $9
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !3, $10
   10    14        INIT_FCALL                                               'array_diff_key'
         15        SEND_VAR                                                 !2
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !4, $12
   11    19        INIT_FCALL                                               'implode'
         20        SEND_VAL                                                 '%2C+'
         21        SEND_VAR                                                 !4
         22        DO_ICALL                                         $14     
         23        CONCAT                                           ~15     'Subscriptions+do+not+exist+for+', $14
         24        ECHO                                                     ~15
   13    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL                                               'array_values'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                         $16     
         29        SEND_VAR                                                 $16
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.56 ms | 1396 KiB | 25 Q