3v4l.org

run code in 300+ PHP versions simultaneously
<?php function str_replace_word($needle,$replacement,$haystack){ $pattern = "/\b$needle\b/i"; $haystack = preg_replace($pattern, $replacement, $haystack); return $haystack; } echo print_r(str_replace_word('ann@ibbeck.de','kan',"ann@ibbeck.de,Petermann@ibbeck.de"),true); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1KAqI
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'str_replace_word'
          2        SEND_VAL                                                 'ann%40ibbeck.de'
          3        SEND_VAL                                                 'kan'
          4        SEND_VAL                                                 'ann%40ibbeck.de%2CPetermann%40ibbeck.de'
          5        DO_FCALL                                      0  $0      
          6        SEND_VAR                                                 $0
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $1      
          9        ECHO                                                     $1
   10    10      > RETURN                                                   1

Function str_replace_word:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1KAqI
function name:  str_replace_word
number of ops:  15
compiled vars:  !0 = $needle, !1 = $replacement, !2 = $haystack, !3 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        ROPE_INIT                                     3  ~5      '%2F%5Cb'
          4        ROPE_ADD                                      1  ~5      ~5, !0
          5        ROPE_END                                      2  ~4      ~5, '%5Cb%2Fi'
          6        ASSIGN                                                   !3, ~4
    5     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAR                                                 !3
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !2, $8
    6    13      > RETURN                                                   !2
    7    14*     > RETURN                                                   null

End of function str_replace_word

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.67 ms | 1398 KiB | 18 Q