3v4l.org

run code in 500+ PHP versions simultaneously
<?php $source = '/<img src="http:\/\/website\.com\/char\/sign\/(.+?)\.png">/'; $new = '[sign]$1[/sign]'; $text = '<img src="http://website.com/char/sign/Name+Surname.png">, <img src="http://website.com/char/sign/Bob-Robinson.png">, <img src="http://website.com/char/sign/Michael%2527Ross.png">'; $text = preg_replace($source, $new, $text); echo $text;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WC5oJ
function name:  (null)
number of ops:  8
compiled vars:  !0 = $source, !1 = $new, !2 = $text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%2F%3Cimg+src%3D%22http%3A%5C%2F%5C%2Fwebsite%5C.com%5C%2Fchar%5C%2Fsign%5C%2F%28.%2B%3F%29%5C.png%22%3E%2F'
    3     1        ASSIGN                                                       !1, '%5Bsign%5D%241%5B%2Fsign%5D'
    4     2        ASSIGN                                                       !2, '%3Cimg+src%3D%22http%3A%2F%2Fwebsite.com%2Fchar%2Fsign%2FName%2BSurname.png%22%3E%2C+%3Cimg+src%3D%22http%3A%2F%2Fwebsite.com%2Fchar%2Fsign%2FBob-Robinson.png%22%3E%2C+%3Cimg+src%3D%22http%3A%2F%2Fwebsite.com%2Fchar%2Fsign%2FMichael%252527Ross.png%22%3E'
    5     3        FRAMELESS_ICALL_3                preg_replace        ~6      !0, !1
          4        OP_DATA                                                      !2
          5        ASSIGN                                                       !2, ~6
    6     6        ECHO                                                         !2
          7      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.21 ms | 2918 KiB | 13 Q