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_values(array_filter(array_intersect_key($lookup, $subscriptions))); var_dump($lists); $diff = array_diff_key($subscriptions, $lists); echo 'Subscriptions do not exist for ' . implode(', ', $diff);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K0Y8Y
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_values'
          7        INIT_FCALL                                               'array_filter'
          8        INIT_FCALL                                               'array_intersect_key'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $9      
         12        SEND_VAR                                                 $9
         13        DO_ICALL                                         $10     
         14        SEND_VAR                                                 $10
         15        DO_ICALL                                         $11     
         16        ASSIGN                                                   !3, $11
    8    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
   10    20        INIT_FCALL                                               'array_diff_key'
         21        SEND_VAR                                                 !2
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                         $14     
         24        ASSIGN                                                   !4, $14
   11    25        INIT_FCALL                                               'implode'
         26        SEND_VAL                                                 '%2C+'
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                         $16     
         29        CONCAT                                           ~17     'Subscriptions+do+not+exist+for+', $16
         30        ECHO                                                     ~17
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.77 ms | 1396 KiB | 25 Q