3v4l.org

run code in 300+ PHP versions simultaneously
<?php $template = "[HOGE]HOGE"; $body = $template; $body = str_replace( "[HOGE]", "huga", $body ); echo "body:$body\n"; echo "$template:$template\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DZ3iS
function name:  (null)
number of ops:  18
compiled vars:  !0 = $template, !1 = $body
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5BHOGE%5DHOGE'
    5     1        ASSIGN                                                   !1, !0
    7     2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 '%5BHOGE%5D'
          4        SEND_VAL                                                 'huga'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !1, $4
    9     8        ROPE_INIT                                     3  ~7      'body%3A'
          9        ROPE_ADD                                      1  ~7      ~7, !1
         10        ROPE_END                                      2  ~6      ~7, '%0A'
         11        ECHO                                                     ~6
   10    12        ROPE_INIT                                     4  ~10     !0
         13        ROPE_ADD                                      1  ~10     ~10, '%3A'
         14        ROPE_ADD                                      2  ~10     ~10, !0
         15        ROPE_END                                      3  ~9      ~10, '%0A'
         16        ECHO                                                     ~9
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.03 ms | 1394 KiB | 15 Q