3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '%%ANCHOR%% is een %%LINK%%'; function replace_str($str) { $str = str_replace('%%ANCHOR%%', 'test', $str); $str = str_replace('%%LINK%%', 'link', $str); return $str; } echo replace_str($str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5kldA
function name:  (null)
number of ops:  6
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%25%25ANCHOR%25%25+is+een+%25%25LINK%25%25'
   10     1        INIT_FCALL                                               'replace_str'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function replace_str:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5kldA
function name:  replace_str
number of ops:  15
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%25%25ANCHOR%25%25'
          3        SEND_VAL                                                 'test'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6        ASSIGN                                                   !0, $1
    6     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 '%25%25LINK%25%25'
          9        SEND_VAL                                                 'link'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $3      
         12        ASSIGN                                                   !0, $3
    7    13      > RETURN                                                   !0
    8    14*     > RETURN                                                   null

End of function replace_str

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.06 ms | 1398 KiB | 16 Q