3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = '<p style="text-align: justify;"> <a href="http://www.disenowebusabilidad.es/wp-content/uploads/2012/09/fuentes-web-google-fonts.jpg"><img class="aligncenter size-full wp-image-39" title="fuentes-web-google-fonts" src="http://www.disenowebusabilidad.es/wp-content/uploads/2012/09/fuentes-web-google-fonts.jpg" alt="fuentes web con Google Fonts API" width="490" height="300" /></a></p>'; $matches = array(); preg_match_all( '/<a(.*?)href="(.*?)"/i', $content, $matches); $url = str_replace('disenowebusabilidad.com', 'adoramedia.es', $matches[2]); echo preg_replace('/<a(.*?)href="(.*?)"/i', '<a${1}href="' . $url . '"', $content);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1ef0g
function name:  (null)
number of ops:  23
compiled vars:  !0 = $content, !1 = $matches, !2 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cp+style%3D%22text-align%3A+justify%3B%22%3E%C2%A0%3Ca+href%3D%22http%3A%2F%2Fwww.disenowebusabilidad.es%2Fwp-content%2Fuploads%2F2012%2F09%2Ffuentes-web-google-fonts.jpg%22%3E%3Cimg+class%3D%22aligncenter+size-full+wp-image-39%22+title%3D%22fuentes-web-google-fonts%22+src%3D%22http%3A%2F%2Fwww.disenowebusabilidad.es%2Fwp-content%2Fuploads%2F2012%2F09%2Ffuentes-web-google-fonts.jpg%22+alt%3D%22fuentes+web+con+Google+Fonts+API%22+width%3D%22490%22+height%3D%22300%22+%2F%3E%3C%2Fa%3E%3C%2Fp%3E'
    5     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%3Ca%28.%2A%3F%29href%3D%22%28.%2A%3F%29%22%2Fi'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 'disenowebusabilidad.com'
          9        SEND_VAL                                                 'adoramedia.es'
         10        FETCH_DIM_R                                      ~6      !1, 2
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !2, $7
    8    14        INIT_FCALL                                               'preg_replace'
         15        SEND_VAL                                                 '%2F%3Ca%28.%2A%3F%29href%3D%22%28.%2A%3F%29%22%2Fi'
         16        CONCAT                                           ~9      '%3Ca%24%7B1%7Dhref%3D%22', !2
         17        CONCAT                                           ~10     ~9, '%22'
         18        SEND_VAL                                                 ~10
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $11     
         21        ECHO                                                     $11
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.64 ms | 1395 KiB | 19 Q