3v4l.org

run code in 500+ PHP versions simultaneously
<?php $items = array(array('title' => 'title', 'image' => 'image', 'link' => 'link')); $template = ' <div class="card"> <h1>{{CARD_TITLE}}</h1> {{CARD_IMAGE}} {{CARD_LINK}} </div> '; foreach ($items as $item) { echo strtr($template, array('{{CARD_TITLE}}' => $item['title'], '{{CARD_IMAGE}}' => $item['image'], '{{CARD_LINK}}' => $item['link'])); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/ftqqs
function name:  (null)
number of ops:  15
compiled vars:  !0 = $items, !1 = $template, !2 = $item
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    3     1        ASSIGN                                                       !1, '%0A++++%3Cdiv+class%3D%22card%22%3E%0A++++++++%3Ch1%3E%7B%7BCARD_TITLE%7D%7D%3C%2Fh1%3E%0A++++++++%7B%7BCARD_IMAGE%7D%7D%0A++++++++%7B%7BCARD_LINK%7D%7D%0A++++%3C%2Fdiv%3E%0A'
   10     2      > FE_RESET_R                                           $5      !0, ->13
          3    > > FE_FETCH_R                                                   $5, !2, ->13
   11     4    >   FETCH_DIM_R                                          ~6      !2, 'title'
          5        INIT_ARRAY                                           ~7      ~6, '%7B%7BCARD_TITLE%7D%7D'
   12     6        FETCH_DIM_R                                          ~8      !2, 'image'
          7        ADD_ARRAY_ELEMENT                                    ~7      ~8, '%7B%7BCARD_IMAGE%7D%7D'
   13     8        FETCH_DIM_R                                          ~9      !2, 'link'
          9        ADD_ARRAY_ELEMENT                                    ~7      ~9, '%7B%7BCARD_LINK%7D%7D'
   11    10        FRAMELESS_ICALL_2                strtr               ~10     !1, ~7
   13    11        ECHO                                                         ~10
   10    12      > JMP                                                          ->3
         13    >   FE_FREE                                                      $5
   14    14      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
146.28 ms | 2269 KiB | 13 Q