3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 'https://flash---art.com/2021/05/kw-digital-with-the-last-museum-a-website-specific-exhibition/#'; $regex = '_^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:localhost)|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$_iu'; echo preg_match($regex, $value ?? '') ? 'correct' : 'nope';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
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: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R88ri
function name:  (null)
number of ops:  14
compiled vars:  !0 = $value, !1 = $regex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Fflash---art.com%2F2021%2F05%2Fkw-digital-with-the-last-museum-a-website-specific-exhibition%2F%23'
    3     1        ASSIGN                                                   !1, '_%5E%28%3F%3A%28%3F%3Ahttps%3F%7Cftp%29%3A%5C%2F%5C%2F%29%28%3F%3A%5CS%2B%28%3F%3A%3A%5CS%2A%29%3F%40%29%3F%28%3F%3A%28%3F%2110%28%3F%3A%5C.%5Cd%7B1%2C3%7D%29%7B3%7D%29%28%3F%21169%5C.254%28%3F%3A%5C.%5Cd%7B1%2C3%7D%29%7B2%7D%29%28%3F%21192%5C.168%28%3F%3A%5C.%5Cd%7B1%2C3%7D%29%7B2%7D%29%28%3F%21172%5C.%28%3F%3A1%5B6-9%5D%7C2%5Cd%7C3%5B0-1%5D%29%28%3F%3A%5C.%5Cd%7B1%2C3%7D%29%7B2%7D%29%28%3F%3A%5B1-9%5D%5Cd%3F%7C1%5Cd%5Cd%7C2%5B01%5D%5Cd%7C22%5B0-3%5D%29%28%3F%3A%5C.%28%3F%3A1%3F%5Cd%7B1%2C2%7D%7C2%5B0-4%5D%5Cd%7C25%5B0-5%5D%29%29%7B2%7D%28%3F%3A%5C.%28%3F%3A%5B1-9%5D%5Cd%3F%7C1%5Cd%5Cd%7C2%5B0-4%5D%5Cd%7C25%5B0-4%5D%29%29%7C%28%3F%3Alocalhost%29%7C%28%3F%3A%28%3F%3A%5Ba-z%5Cx%7B00a1%7D-%5Cx%7Bffff%7D0-9%5D%2B-%3F%29%2A%5Ba-z%5Cx%7B00a1%7D-%5Cx%7Bffff%7D0-9%5D%2B%29%28%3F%3A%5C.%28%3F%3A%5Ba-z%5Cx%7B00a1%7D-%5Cx%7Bffff%7D0-9%5D%2B-%3F%29%2A%5Ba-z%5Cx%7B00a1%7D-%5Cx%7Bffff%7D0-9%5D%2B%29%2A%28%3F%3A%5C.%28%3F%3A%5Ba-z%5Cx%7B00a1%7D-%5Cx%7Bffff%7D%5D%7B2%2C%7D%29%29%29%28%3F%3A%3A%5Cd%7B2%2C5%7D%29%3F%28%3F%3A%5C%2F%5B%5E%5Cs%5D%2A%29%3F%24_iu'
    4     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        COALESCE                                         ~4      !0
          5        QM_ASSIGN                                        ~4      ''
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                         $5      
          8      > JMPZ                                                     $5, ->11
          9    >   QM_ASSIGN                                        ~6      'correct'
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~6      'nope'
         12    >   ECHO                                                     ~6
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.43 ms | 1395 KiB | 15 Q