3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variable = "asdfasdg <img src=\"foo.jpg\"> asdgfasdgasdg"; print preg_replace("~src=\"([^\"])\.(jpg|png|gif)\"~iu", "=src\"$1.$2?style=grid\"", $variable);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b4mFT
function name:  (null)
number of ops:  8
compiled vars:  !0 = $variable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'asdfasdg+%3Cimg+src%3D%22foo.jpg%22%3E+asdgfasdgasdg'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%7Esrc%3D%22%28%5B%5E%22%5D%29%5C.%28jpg%7Cpng%7Cgif%29%22%7Eiu'
          3        SEND_VAL                                                 '%3Dsrc%22%241.%242%3Fstyle%3Dgrid%22'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
          7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.04 ms | 1394 KiB | 15 Q