3v4l.org

run code in 300+ PHP versions simultaneously
<?php function autoLink($str) { return preg_replace('/((http|https|ftp):\/\/[\w?=&.\/-;#~%-]+(?![\w\s?&.\/;#~%"=-]*>))/iu', '<a href="$1" target="_blank">$1</a>', $str); } var_dump(autoLink('to jst link http://www.google.pl do gogle'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nuq0g
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'autolink'
          2        SEND_VAL                                                 'to+jst+link+http%3A%2F%2Fwww.google.pl+do+gogle'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function autolink:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nuq0g
function name:  autoLink
number of ops:  8
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%28http%7Chttps%7Cftp%29%3A%5C%2F%5C%2F%5B%5Cw%3F%3D%26.%5C%2F-%3B%23%7E%25-%5D%2B%28%3F%21%5B%5Cw%5Cs%3F%26.%5C%2F%3B%23%7E%25%22%3D-%5D%2A%3E%29%29%2Fiu'
          3        SEND_VAL                                                 '%3Ca+href%3D%22%241%22+target%3D%22_blank%22%3E%241%3C%2Fa%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
    4     7*     > RETURN                                                   null

End of function autolink

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.76 ms | 1397 KiB | 18 Q