3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_string = "newtext!234@@random_text@@weludud"; $replace = 'replaced_text'; $replaced_text = preg_replace('#(@)(.*)(@)#si', "$1$replace$3", $text); echo $replaced_text;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cffsU
function name:  (null)
number of ops:  13
compiled vars:  !0 = $my_string, !1 = $replace, !2 = $replaced_text, !3 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'newtext%21234%40%40random_text%40%40weludud'
    3     1        ASSIGN                                                   !1, 'replaced_text'
    4     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%23%28%40%29%28.%2A%29%28%40%29%23si'
          4        ROPE_INIT                                     3  ~7      '%241'
          5        ROPE_ADD                                      1  ~7      ~7, !1
          6        ROPE_END                                      2  ~6      ~7, '%243'
          7        SEND_VAL                                                 ~6
          8        SEND_VAR                                                 !3
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !2, $9
    5    11        ECHO                                                     !2
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.04 ms | 1394 KiB | 15 Q