3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pj = array('title' => 'My Title Pj', 'price' => '4 $', 'comment' => 'Cool!', 'favicon' => './img/favicon-435.jpg'); $tmp = "Title.... {Title} \r\n"; $tmp .= "Price: {Price} \r\n"; $tmp .= "Comment: {Comment} \r\n"; foreach($pj as $k => $v){ $k = ucfirst($k); $tmp = str_replace("{$k}", $v, $tmp); } echo $tmp;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/bdK2X
function name:  (null)
number of ops:  22
compiled vars:  !0 = $pj, !1 = $tmp, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, 'Title....+%7BTitle%7D+%0D%0A'
    7     2        ASSIGN_OP                                     8          !1, 'Price%3A++%7BPrice%7D+%0D%0A'
    8     3        ASSIGN_OP                                     8          !1, 'Comment%3A+%7BComment%7D+%0D%0A'
   10     4      > FE_RESET_R                                       $8      !0, ->19
          5    > > FE_FETCH_R                                       ~9      $8, !2, ->19
          6    >   ASSIGN                                                   !3, ~9
   11     7        INIT_FCALL                                               'ucfirst'
          8        SEND_VAR                                                 !3
          9        DO_ICALL                                         $11     
         10        ASSIGN                                                   !3, $11
   12    11        INIT_FCALL                                               'str_replace'
         12        CAST                                          6  ~13     !3
         13        SEND_VAL                                                 ~13
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $14     
         17        ASSIGN                                                   !1, $14
   10    18      > JMP                                                      ->5
         19    >   FE_FREE                                                  $8
   17    20        ECHO                                                     !1
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.57 ms | 1399 KiB | 17 Q