3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = '@'; $end = '@'; $text = 'newtext!234@@random_text@@weludud'; $replace = 'test'; $msg = preg_replace('#('.$start.')(.*)('.$end.')#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/34k4o
function name:  (null)
number of ops:  19
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        CONCAT                                           ~9      '%23%28', !0
          6        CONCAT                                           ~10     ~9, '%29%28.%2A%29%28'
          7        CONCAT                                           ~11     ~10, !1
          8        CONCAT                                           ~12     ~11, '%29%23si'
          9        SEND_VAL                                                 ~12
         10        ROPE_INIT                                     3  ~14     '%241'
         11        ROPE_ADD                                      1  ~14     ~14, !3
         12        ROPE_END                                      2  ~13     ~14, '%243'
         13        SEND_VAL                                                 ~13
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $16     
         16        ASSIGN                                                   !4, $16
    7    17        ECHO                                                     !4
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.93 ms | 1395 KiB | 15 Q