3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (array('19.03.2014','30.02.1980','1.1.1970','1781980', '04071792') as $value) { print("$value\n"); if (1 === preg_match('/^([0-3]?[0-9])\\.?([01]?[0-9])\\.?((19|20)[0-9][0-9])$/', trim($value), $matches)) { var_dump($matches); } else { print("No match\n"); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 21
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 21
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/eS7Rq
function name:  (null)
number of ops:  23
compiled vars:  !0 = $value, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > FE_RESET_R                                       $2      <array>, ->21
          1    > > FE_FETCH_R                                               $2, !0, ->21
    4     2    >   NOP                                                      
          3        FAST_CONCAT                                      ~3      !0, '%0A'
          4        ECHO                                                     ~3
    5     5        INIT_FCALL                                               'preg_match'
          6        SEND_VAL                                                 '%2F%5E%28%5B0-3%5D%3F%5B0-9%5D%29%5C.%3F%28%5B01%5D%3F%5B0-9%5D%29%5C.%3F%28%2819%7C20%29%5B0-9%5D%5B0-9%5D%29%24%2F'
          7        INIT_FCALL                                               'trim'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        SEND_REF                                                 !1
         12        DO_ICALL                                         $5      
         13        IS_IDENTICAL                                             $5, 1
         14      > JMPZ                                                     ~6, ->19
    6    15    >   INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > JMP                                                      ->20
    8    19    >   ECHO                                                     'No+match%0A'
    3    20    > > JMP                                                      ->1
         21    >   FE_FREE                                                  $2
   10    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.55 ms | 1395 KiB | 19 Q