3v4l.org

run code in 300+ 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:  11
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        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
    6     9        ECHO                                                     !2
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.23 ms | 1398 KiB | 15 Q