3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(preg_match('#/search/(?P<mac>(?:[[:xdigit:]]{2}([-:]))(?:[[:xdigit:]]{2}\2){4}[[:xdigit:]]{2})#', '/search/12-12-12-12-12-12', $matches)); var_dump($matches); var_dump(preg_match('#(?:[[:xdigit:]]{2}([-:]))(?:[[:xdigit:]]{2}\1){4}[[:xdigit:]]{2}#', '12-12-12-12-12-12', $matches)); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HpG00
function name:  (null)
number of ops:  23
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%23%2Fsearch%2F%28%3FP%3Cmac%3E%28%3F%3A%5B%5B%3Axdigit%3A%5D%5D%7B2%7D%28%5B-%3A%5D%29%29%28%3F%3A%5B%5B%3Axdigit%3A%5D%5D%7B2%7D%5C2%29%7B4%7D%5B%5B%3Axdigit%3A%5D%5D%7B2%7D%29%23'
          3        SEND_VAL                                                 '%2Fsearch%2F12-12-12-12-12-12'
          4        SEND_REF                                                 !0
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                                 
    4     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
    6    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'preg_match'
         13        SEND_VAL                                                 '%23%28%3F%3A%5B%5B%3Axdigit%3A%5D%5D%7B2%7D%28%5B-%3A%5D%29%29%28%3F%3A%5B%5B%3Axdigit%3A%5D%5D%7B2%7D%5C1%29%7B4%7D%5B%5B%3Axdigit%3A%5D%5D%7B2%7D%23'
         14        SEND_VAL                                                 '12-12-12-12-12-12'
         15        SEND_REF                                                 !0
         16        DO_ICALL                                         $4      
         17        SEND_VAR                                                 $4
         18        DO_ICALL                                                 
    7    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.47 ms | 1395 KiB | 17 Q