3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = "abc 123{abc"; $find ="abc 123{abc"; $repl = "xyz 7777{abc"; $pattern = ["/(\w{3})\s/", "/\{(\w{3})/"]; $repl2 = ["something has ", "{changed"]; $str = Str_replace($find, $repl, $str); Echo $str ."\n"; $str = preg_replace($pattern, $repl2, $str); Echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hR9rF
function name:  (null)
number of ops:  15
compiled vars:  !0 = $str, !1 = $find, !2 = $repl, !3 = $pattern, !4 = $repl2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'abc+123%7Babc'
    5     1        ASSIGN                                                       !1, 'abc+123%7Babc'
    6     2        ASSIGN                                                       !2, 'xyz+7777%7Babc'
    8     3        ASSIGN                                                       !3, <array>
    9     4        ASSIGN                                                       !4, <array>
   11     5        FRAMELESS_ICALL_3                str_replace         ~10     !1, !2
          6        OP_DATA                                                      !0
          7        ASSIGN                                                       !0, ~10
   12     8        CONCAT                                               ~12     !0, '%0A'
          9        ECHO                                                         ~12
   14    10        FRAMELESS_ICALL_3                preg_replace        ~13     !3, !4
         11        OP_DATA                                                      !0
         12        ASSIGN                                                       !0, ~13
   15    13        ECHO                                                         !0
   16    14      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
218.82 ms | 2185 KiB | 13 Q