3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = ['title' => 'The Title', 'type' => 'Movie', 'hour' => '', 'dayoftheweek' => 5, 'dayofthemonth' => '']; $whitelist = ['title' => '', 'type' => '']; $filtered = array_intersect_key($data, $whitelist); // var_export($filtered); // uncomment if you want to see what remains foreach($filtered as $key => $value) { echo "<div class=\"col-md-4\">\n"; echo "\t<div class=\"name-value\" id=\"$key\">$value</div>\n"; echo "</div>\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 19
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/rUgjb
function name:  (null)
number of ops:  21
compiled vars:  !0 = $data, !1 = $whitelist, !2 = $filtered, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'array_intersect_key'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !2, $7
    7     7      > FE_RESET_R                                       $9      !2, ->19
          8    > > FE_FETCH_R                                       ~10     $9, !3, ->19
          9    >   ASSIGN                                                   !4, ~10
    8    10        ECHO                                                     '%3Cdiv+class%3D%22col-md-4%22%3E%0A'
    9    11        ROPE_INIT                                     5  ~13     '%09%3Cdiv+class%3D%22name-value%22+id%3D%22'
         12        ROPE_ADD                                      1  ~13     ~13, !4
         13        ROPE_ADD                                      2  ~13     ~13, '%22%3E'
         14        ROPE_ADD                                      3  ~13     ~13, !3
         15        ROPE_END                                      4  ~12     ~13, '%3C%2Fdiv%3E%0A'
         16        ECHO                                                     ~12
   10    17        ECHO                                                     '%3C%2Fdiv%3E%0A'
    7    18      > JMP                                                      ->8
         19    >   FE_FREE                                                  $9
   11    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.17 ms | 1395 KiB | 15 Q