3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urls=[ 'http://domain1.com/media/uploads/2017/11/image-test-1.jpg', 'https://domain2.org/photos/uploads/2016/08/anotherimage.png' ]; $urls=preg_replace('@(http[s]*?://[-\w./]+)(/[\w-]+\.(png|jpg))@','images$2',$urls); var_export($urls);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dvv8B
function name:  (null)
number of ops:  11
compiled vars:  !0 = $urls
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%40%28http%5Bs%5D%2A%3F%3A%2F%2F%5B-%5Cw.%2F%5D%2B%29%28%2F%5B%5Cw-%5D%2B%5C.%28png%7Cjpg%29%29%40'
          3        SEND_VAL                                                 'images%242'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    9     7        INIT_FCALL                                               'var_export'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.97 ms | 1010 KiB | 15 Q