3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.1 ms | 1394 KiB | 15 Q