3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = '/video/bb14ff1ecc65c3272a0ee199f8005b72.ogv'; $regex = '^\/(download|thumbs|screens|video|strip)\/.*'; $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/04t6L
function name:  (null)
number of ops:  15
compiled vars:  !0 = $url, !1 = $regex, !2 = $arrMatch
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%2Fvideo%2Fbb14ff1ecc65c3272a0ee199f8005b72.ogv'
    5     1        ASSIGN                                                   !1, '%5E%5C%2F%28download%7Cthumbs%7Cscreens%7Cvideo%7Cstrip%29%5C%2F.%2A'
    7     2        ASSIGN                                                   !2, <array>
    8     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
    9     9    >   INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > JMP                                                      ->14
   11    13    >   ECHO                                                     'NOK'
   12    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.66 ms | 1394 KiB | 17 Q