3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startDate = '2014-01-01'; $endDate = '2014-12-31'; $pattern = '/^(\d{4})-(\d{2})-(\d{2})$/'; if (!preg_match($pattern, $startDate) || !preg_match($pattern, $endDate)) { return 'Invalid date ranges'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/36Ul7
function name:  (null)
number of ops:  18
compiled vars:  !0 = $startDate, !1 = $endDate, !2 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '2014-01-01'
    5     1        ASSIGN                                                   !1, '2014-12-31'
    6     2        ASSIGN                                                   !2, '%2F%5E%28%5Cd%7B4%7D%29-%28%5Cd%7B2%7D%29-%28%5Cd%7B2%7D%29%24%2F'
    7     3        INIT_FCALL                                               'preg_match'
          4        SEND_VAR                                                 !2
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        BOOL_NOT                                         ~7      $6
          8      > JMPNZ_EX                                         ~7      ~7, ->15
          9    >   INIT_FCALL                                               'preg_match'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $8      
         13        BOOL_NOT                                         ~9      $8
         14        BOOL                                             ~7      ~9
         15    > > JMPZ                                                     ~7, ->17
    8    16    > > RETURN                                                   'Invalid+date+ranges'
    9    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.14 ms | 1399 KiB | 15 Q