3v4l.org

run code in 300+ PHP versions simultaneously
<?php $formats = array( 'plain_text' => 'plain_text', ); $elements['#allowed_formats'] = array(); $formats = array_intersect_key($formats, array_flip($elements['#allowed_formats'])); var_dump($formats);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fdtYb
function name:  (null)
number of ops:  16
compiled vars:  !0 = $formats, !1 = $elements
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN_DIM                                               !1, '%23allowed_formats'
          2        OP_DATA                                                  <array>
    7     3        INIT_FCALL                                               'array_intersect_key'
          4        SEND_VAR                                                 !0
          5        INIT_FCALL                                               'array_flip'
          6        FETCH_DIM_R                                      ~4      !1, '%23allowed_formats'
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !0, $6
    8    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.41 ms | 1394 KiB | 19 Q