3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = '<img src="https://link.com"> https://link.com<img src=\'https://link.com\'>'; $acturl = '~(?<!src=["\'])(?:(https?)://([^\s<]+)|(www\.[^\s<]+?\.[^\s<]+))(?<![\.,:])~i'; $content = preg_replace($acturl, '<a href="$0">$0</a>', $content); echo $content;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Zlgpg
function name:  (null)
number of ops:  10
compiled vars:  !0 = $content, !1 = $acturl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cimg+src%3D%22https%3A%2F%2Flink.com%22%3E%0Ahttps%3A%2F%2Flink.com%3Cimg+src%3D%27https%3A%2F%2Flink.com%27%3E'
    4     1        ASSIGN                                                   !1, '%7E%28%3F%3C%21src%3D%5B%22%27%5D%29%28%3F%3A%28https%3F%29%3A%2F%2F%28%5B%5E%5Cs%3C%5D%2B%29%7C%28www%5C.%5B%5E%5Cs%3C%5D%2B%3F%5C.%5B%5E%5Cs%3C%5D%2B%29%29%28%3F%3C%21%5B%5C.%2C%3A%5D%29%7Ei'
    6     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 '%3Ca+href%3D%22%240%22%3E%240%3C%2Fa%3E'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
    7     8        ECHO                                                     !0
    8     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.34 ms | 998 KiB | 14 Q