3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "The text you want to filter goes here. http://google.com, https://www.youtube.com/watch?v=K_m7NEDMrV0,https://instagram.com/hellow/"; preg_match_all('#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', $string, $match); echo "<pre>"; print_r($match[0]); echo "</pre>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xl2PV
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string, !1 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'The+text+you+want+to+filter+goes+here.+http%3A%2F%2Fgoogle.com%2C+https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DK_m7NEDMrV0%2Chttps%3A%2F%2Finstagram.com%2Fhellow%2F'
    6     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%23%5Cbhttps%3F%3A%2F%2F%5B%5E%2C%5Cs%28%29%3C%3E%5D%2B%28%3F%3A%5C%28%5B%5Cw%5Cd%5D%2B%5C%29%7C%28%5B%5E%2C%5B%3Apunct%3A%5D%5Cs%5D%7C%2F%29%29%23'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    8     6        ECHO                                                     '%3Cpre%3E'
    9     7        INIT_FCALL                                               'print_r'
          8        FETCH_DIM_R                                      ~4      !1, 0
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                                 
   10    11        ECHO                                                     '%3C%2Fpre%3E'
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.69 ms | 1394 KiB | 17 Q