3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = '/download/b1946ac92492d2347c6235b4d2611184.mp4'; $regex = '/^\/(video|screens|download|strip)\/([\w+]{32})(\.|\/)(\w+)/'; $arrMatch = array(); if (preg_match($regex, $url, $arrMatch)) { var_dump($arrMatch); }else{ echo 'NOK'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mJBaM
function name:  (null)
number of ops:  15
compiled vars:  !0 = $url, !1 = $regex, !2 = $arrMatch
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Fdownload%2Fb1946ac92492d2347c6235b4d2611184.mp4'
    4     1        ASSIGN                                                   !1, '%2F%5E%5C%2F%28video%7Cscreens%7Cdownload%7Cstrip%29%5C%2F%28%5B%5Cw%2B%5D%7B32%7D%29%28%5C.%7C%5C%2F%29%28%5Cw%2B%29%2F'
    6     2        ASSIGN                                                   !2, <array>
    7     3        INIT_FCALL                                               'preg_match'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        SEND_REF                                                 !2
          7        DO_ICALL                                         $6      
          8      > JMPZ                                                     $6, ->13
    8     9    >   INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > JMP                                                      ->14
   10    13    >   ECHO                                                     'NOK'
   11    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.92 ms | 1395 KiB | 17 Q