3v4l.org

run code in 500+ PHP versions simultaneously
<?php $products = array ( array ( 'product_id' => 'RD55559955', 'product_name' => 'Ontsteking (DI) Cassette Zwart Origineel Saab 9-3/9-5', 'price_excl' => 22600, 'product_brand' => 'Origineel Saab', ), array ( 'product_id' => 'RD55559955', 'product_name' => 'een ander product', 'price_excl' => 22600, 'product_brand' => 'Origineel Saab', ), array ( 'product_id' => 'RD55559955', 'product_name' => 'nog een ander product', 'price_excl' => 22600, 'product_brand' => 'Origineel Saab', ) ); $content = <<<CONTENT <div> ##PRODUCT_NAME## <br /> Onderdeel Nr: ##PRODUCT_ID## <br /> Merk: ##PRODUCT_BRAND## <br /> Prijs: €##PRODUCT_PRICE## <br /> </div> CONTENT; foreach ($products as $product) { echo str_replace( ['##PRODUCT_ID##', '##PRODUCT_NAME##', '##PRODUCT_PRICE##', '##PRODUCT_BRAND##'], [$product['product_id'], $product['product_name'], round($product['price_excl']/100, 2), $product['product_brand']], $content ); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/CRFvU
function name:  (null)
number of ops:  23
compiled vars:  !0 = $products, !1 = $content, !2 = $product
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   30     1        ASSIGN                                                       !1, '%3Cdiv%3E%0A+++++%23%23PRODUCT_NAME%23%23+++++++++++++++++++++%3Cbr+%2F%3E++++%0A+++++Onderdeel+Nr%3A+%23%23PRODUCT_ID%23%23+++++++++%3Cbr+%2F%3E++%0A+++++Merk%3A+%23%23PRODUCT_BRAND%23%23++++++++++++++%3Cbr+%2F%3E++%0A+++++Prijs%3A+%E2%82%AC%23%23PRODUCT_PRICE%23%23++++++++++++%3Cbr+%2F%3E%0A%3C%2Fdiv%3E'
   39     2      > FE_RESET_R                                           $5      !0, ->21
          3    > > FE_FETCH_R                                                   $5, !2, ->21
   45     4    >   FETCH_DIM_R                                          ~6      !2, 'product_id'
          5        INIT_ARRAY                                           ~7      ~6
   46     6        FETCH_DIM_R                                          ~8      !2, 'product_name'
          7        ADD_ARRAY_ELEMENT                                    ~7      ~8
   47     8        INIT_FCALL                                                   'round'
          9        FETCH_DIM_R                                          ~9      !2, 'price_excl'
         10        DIV                                                  ~10     ~9, 100
         11        SEND_VAL                                                     ~10
         12        SEND_VAL                                                     2
         13        DO_ICALL                                             $11     
         14        ADD_ARRAY_ELEMENT                                    ~7      $11
   48    15        FETCH_DIM_R                                          ~12     !2, 'product_brand'
         16        ADD_ARRAY_ELEMENT                                    ~7      ~12
   40    17        FRAMELESS_ICALL_3                str_replace         ~13     <array>, ~7
   49    18        OP_DATA                                                      !1
         19        ECHO                                                         ~13
   39    20      > JMP                                                          ->3
         21    >   FE_FREE                                                      $5
   51    22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
201.39 ms | 2243 KiB | 16 Q