3v4l.org

run code in 300+ PHP versions simultaneously
<?php $all = ['a', 'b', 'c']; $defaults = array_fill_keys($all, 0); $new = ['b', 'c']; var_export( array_fill_keys(array_intersect($all, $new), 1) + $defaults + ['directCallId' => '654'] );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FLIip
function name:  (null)
number of ops:  21
compiled vars:  !0 = $all, !1 = $defaults, !2 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_fill_keys'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        ASSIGN                                                   !2, <array>
    6     7        INIT_FCALL                                               'var_export'
    7     8        INIT_FCALL                                               'array_fill_keys'
          9        INIT_FCALL                                               'array_intersect'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        SEND_VAL                                                 1
         15        DO_ICALL                                         $8      
    8    16        ADD                                              ~9      $8, !1
    9    17        ADD                                              ~10     ~9, <array>
         18        SEND_VAL                                                 ~10
    6    19        DO_ICALL                                                 
   10    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
218.26 ms | 999 KiB | 16 Q