3v4l.org

run code in 300+ PHP versions simultaneously
<?php $img = '<img src="http://ubmcmm.baidustatic.com/media/v1/0f0007MbSXctTD5AG7dqt6.jpg" style="width: 100px; height: 100px;">'; $newImg = preg_replace('/(<img\s+src=[\'|"])(.*)([\'|"].*>)/','$1aaa.jpg$3',$img); var_dump($newImg);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OZ8nC
function name:  (null)
number of ops:  11
compiled vars:  !0 = $img, !1 = $newImg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cimg+src%3D%22http%3A%2F%2Fubmcmm.baidustatic.com%2Fmedia%2Fv1%2F0f0007MbSXctTD5AG7dqt6.jpg%22+style%3D%22width%3A+100px%3B+height%3A+100px%3B%22%3E'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%3Cimg%5Cs%2Bsrc%3D%5B%27%7C%22%5D%29%28.%2A%29%28%5B%27%7C%22%5D.%2A%3E%29%2F'
          3        SEND_VAL                                                 '%241aaa.jpg%243'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    4     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.87 ms | 1394 KiB | 17 Q