3v4l.org

run code in 300+ 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_regex = 'https?://[-\w()@:%+.~#?&;/=]+'; $regex = "`\s*=\s*['\"]?\s*$url_regex(*SKIP)(*FAIL)|$url_regex`i"; var_export(preg_match_all($regex, $html, $matches) ? $matches[0] : []);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GoBvD
function name:  (null)
number of ops:  22
compiled vars:  !0 = $html, !1 = $url_regex, !2 = $regex, !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-%5Cw%28%29%40%3A%25%2B.%7E%23%3F%26%3B%2F%3D%5D%2B'
   11     2        ROPE_INIT                                     5  ~7      '%60%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, '%28%2ASKIP%29%28%2AFAIL%29%7C'
          5        ROPE_ADD                                      3  ~7      ~7, !1
          6        ROPE_END                                      4  ~6      ~7, '%60i'
          7        ASSIGN                                                   !2, ~6
   13     8        INIT_FCALL                                               'var_export'
          9        INIT_FCALL                                               'preg_match_all'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !0
         12        SEND_REF                                                 !3
         13        DO_ICALL                                         $11     
         14      > JMPZ                                                     $11, ->18
         15    >   FETCH_DIM_R                                      ~12     !3, 0
         16        QM_ASSIGN                                        ~13     ~12
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~13     <array>
         19    >   SEND_VAL                                                 ~13
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.24 ms | 1006 KiB | 15 Q