3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "any text CA-2019-6-000000 any text"; if (preg_match('~\b([A-Z]{2})[-\s](20[0-9]{2}|2100)-(0?[1-9]|1[0-2])-(\d{6})(?!\d)~', $s, $m)) { print_r($m); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/XOINv
function name:  (null)
number of ops:  11
compiled vars:  !0 = $s, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'any+text+CA-2019-6-000000+any+text'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%7E%5Cb%28%5BA-Z%5D%7B2%7D%29%5B-%5Cs%5D%2820%5B0-9%5D%7B2%7D%7C2100%29-%280%3F%5B1-9%5D%7C1%5B0-2%5D%29-%28%5Cd%7B6%7D%29%28%3F%21%5Cd%29%7E'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $3      
          6      > JMPZ                                                     $3, ->10
    5     7    >   INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    6    10    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.94 ms | 1010 KiB | 15 Q