3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Original PHP code by Chirp Internet: www.chirp.com.au // Please acknowledge use of this code by including this header. $url = "http://www.test.de"; $input = file_get_contents($url) or die("Could not access file: $url"); $regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"; if(preg_match_all("/$regexp/siU", $input, $matches)) { // $matches[2] = array of link addresses // $matches[3] = array of link text - including HTML code }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/W7XNj
function name:  (null)
number of ops:  21
compiled vars:  !0 = $url, !1 = $input, !2 = $regexp, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fwww.test.de'
    5     1        INIT_FCALL                                               'file_get_contents'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                           ~6      !1, $5
          5      > JMPNZ_EX                                         ~6      ~6, ->10
          6    >   NOP                                                      
          7        FAST_CONCAT                                      ~7      'Could+not+access+file%3A+', !0
          8      > EXIT                                                     ~7
          9*       BOOL                                             ~6      <true>
    6    10    >   ASSIGN                                                   !2, '%3Ca%5Cs%5B%5E%3E%5D%2Ahref%3D%28%22%3F%3F%29%28%5B%5E%22+%3E%5D%2A%3F%29%5C1%5B%5E%3E%5D%2A%3E%28.%2A%29%3C%5C%2Fa%3E'
    7    11        INIT_FCALL                                               'preg_match_all'
         12        ROPE_INIT                                     3  ~10     '%2F'
         13        ROPE_ADD                                      1  ~10     ~10, !2
         14        ROPE_END                                      2  ~9      ~10, '%2FsiU'
         15        SEND_VAL                                                 ~9
         16        SEND_VAR                                                 !1
         17        SEND_REF                                                 !3
         18        DO_ICALL                                         $12     
         19      > JMPZ                                                     $12, ->20
   11    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160 ms | 1395 KiB | 17 Q