3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_regex = '/(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[012])\/(19|20)\d\d /'; $test_date = '22/03/2010'; if(preg_match($date_regex, $test_date)) { echo 'this date is formatted correctly'; } else { echo 'this date is not formatted correctly'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/spKUv
function name:  (null)
number of ops:  11
compiled vars:  !0 = $date_regex, !1 = $test_date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%280%5B1-9%5D%7C%5B12%5D%5B0-9%5D%7C3%5B01%5D%29%5C%2F%280%5B1-9%5D%7C1%5B012%5D%29%5C%2F%2819%7C20%29%5Cd%5Cd+%2F'
    5     1        ASSIGN                                                   !1, '22%2F03%2F2010'
    6     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $4      
          6      > JMPZ                                                     $4, ->9
    7     7    >   ECHO                                                     'this+date+is+formatted+correctly'
          8      > JMP                                                      ->10
    9     9    >   ECHO                                                     'this+date+is+not+formatted+correctly'
   10    10    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.85 ms | 1394 KiB | 15 Q