3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "{uuid}/{filename}"; $data = array("uuid" => "derp", "filename" => "foo"); foreach ($data as $key => $val){ echo "{".$key."}"; str_replace($key, "{".$key."}", $string); } echo $string;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/vfb7n
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $data, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7Buuid%7D%2F%7Bfilename%7D'
    4     1        ASSIGN                                                   !1, <array>
    5     2      > FE_RESET_R                                       $6      !1, ->16
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->16
          4    >   ASSIGN                                                   !3, ~7
    6     5        CONCAT                                           ~9      '%7B', !3
          6        CONCAT                                           ~10     ~9, '%7D'
          7        ECHO                                                     ~10
    7     8        INIT_FCALL                                               'str_replace'
          9        SEND_VAR                                                 !3
         10        CONCAT                                           ~11     '%7B', !3
         11        CONCAT                                           ~12     ~11, '%7D'
         12        SEND_VAL                                                 ~12
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
    5    15      > JMP                                                      ->3
         16    >   FE_FREE                                                  $6
   10    17        ECHO                                                     !0
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.44 ms | 1399 KiB | 15 Q