3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = 'window.location.href="http://my-site.com";'; preg_match('/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/', $str, $link); if (empty($link[0])) { echo "Nothing found!"; } else { echo $link[0]; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nYkoY
function name:  (null)
number of ops:  13
compiled vars:  !0 = $str, !1 = $link
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'window.location.href%3D%22http%3A%2F%2Fmy-site.com%22%3B'
    5     1        INIT_FCALL                                                   'preg_match'
          2        SEND_VAL                                                     '%2F%28http%7Chttps%7Cftp%7Cftps%29%5C%3A%5C%2F%5C%2F%5Ba-zA-Z0-9%5C-%5C.%5D%2B%5C.%5Ba-zA-Z%5D%7B2%2C3%7D%28%5C%2F%5CS%2A%29%3F%2F'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                                     
    6     6        ISSET_ISEMPTY_DIM_OBJ                             1          !1, 0
          7      > JMPZ                                                         ~4, ->10
    7     8    >   ECHO                                                         'Nothing+found%21'
    6     9      > JMP                                                          ->12
    9    10    >   FETCH_DIM_R                                          ~5      !1, 0
         11        ECHO                                                         ~5
   10    12    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.46 ms | 2794 KiB | 14 Q