3v4l.org

run code in 500+ PHP versions simultaneously
<?php $html = " http://www.url1.com/ = ' http://www.url2.com/ 'http://www.url3.com/ <a href='http://www.url4.com/'>Testing1</a> <img src = 'https://url5.com'>Testing2</a>"; $url_pregex = 'https?://[-a-zA-Z()0-9@:%_+.~#?&;//=]+'; $pregex = "\\s*=\\s*['\"]?\\s*$url_pregex|($url_pregex)"; preg_match_all('`' . $pregex . '`i', $html, $matches); echo "Matches<br><pre>"; var_export(array_values(array_filter($matches[1]))); echo "</pre>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DCN6e
function name:  (null)
number of ops:  28
compiled vars:  !0 = $html, !1 = $url_pregex, !2 = $pregex, !3 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%0Ahttp%3A%2F%2Fwww.url1.com%2F%0A%3D+%27+http%3A%2F%2Fwww.url2.com%2F%0A%27http%3A%2F%2Fwww.url3.com%2F%0A%3Ca+href%3D%27http%3A%2F%2Fwww.url4.com%2F%27%3ETesting1%3C%2Fa%3E%0A%3Cimg+src+%3D+%27https%3A%2F%2Furl5.com%27%3ETesting2%3C%2Fa%3E'
   10     1        ASSIGN                                                       !1, 'https%3F%3A%2F%2F%5B-a-zA-Z%28%290-9%40%3A%25_%2B.%7E%23%3F%26%3B%2F%2F%3D%5D%2B'
   11     2        ROPE_INIT                                         5  ~7      '%5Cs%2A%3D%5Cs%2A%5B%27%22%5D%3F%5Cs%2A'
          3        ROPE_ADD                                          1  ~7      ~7, !1
          4        ROPE_ADD                                          2  ~7      ~7, '%7C%28'
          5        ROPE_ADD                                          3  ~7      ~7, !1
          6        ROPE_END                                          4  ~6      ~7, '%29'
          7        ASSIGN                                                       !2, ~6
   13     8        INIT_FCALL                                                   'preg_match_all'
          9        CONCAT                                               ~11     '%60', !2
         10        CONCAT                                               ~12     ~11, '%60i'
         11        SEND_VAL                                                     ~12
         12        SEND_VAR                                                     !0
         13        SEND_REF                                                     !3
         14        DO_ICALL                                                     
   15    15        ECHO                                                         'Matches%3Cbr%3E%3Cpre%3E'
   16    16        INIT_FCALL                                                   'var_export'
         17        INIT_FCALL                                                   'array_values'
         18        INIT_FCALL                                                   'array_filter'
         19        FETCH_DIM_R                                          ~14     !3, 1
         20        SEND_VAL                                                     ~14
         21        DO_ICALL                                             $15     
         22        SEND_VAR                                                     $15
         23        DO_ICALL                                             $16     
         24        SEND_VAR                                                     $16
         25        DO_ICALL                                                     
   17    26        ECHO                                                         '%3C%2Fpre%3E'
         27      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.82 ms | 1599 KiB | 17 Q