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", $my_string); echo $replaced_text;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JiUFf
function name:  (null)
number of ops:  13
compiled vars:  !0 = $my_string, !1 = $replace, !2 = $replaced_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  ~6      '%241'
          5        ROPE_ADD                                      1  ~6      ~6, !1
          6        ROPE_END                                      2  ~5      ~6, '%243'
          7        SEND_VAL                                                 ~5
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
    5    11        ECHO                                                     !2
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.69 ms | 1398 KiB | 15 Q