3v4l.org

run code in 300+ PHP versions simultaneously
<?php $output = array(); $txt='2014-14-26T00:00:00'; $re1='((?:(?:[1]{1}\\d{1}\\d{1}\\d{1})|(?:[2]{1}\\d{3}))[-:\\/.](?:[0]?[1-9]|[1][012])[-:\\/.](?:(?:[0-2]?\\d{1})|(?:[3][01]{1})))(?![\\d])'; $re2='(T)'; $re3='((?:(?:[0-1][0-9])|(?:[2][0-3])|(?:[0-9])):(?:[0-5][0-9])(?::[0-5][0-9])?(?:\\s?(?:am|AM|pm|PM))?)'; $regex = '(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})'; //if(!preg_match_all ("/".$re1.$re2.$re3."/is", $txt, $matches)){ if(preg_match($regex, $txt)){ $output["status"] = "error"; $output["reason"] = "not valid date"; print_r($output); } else{ $output["status"] = "ok"; $output["reason"] = "valid date"; print_r($output); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/79InF
function name:  (null)
number of ops:  27
compiled vars:  !0 = $output, !1 = $txt, !2 = $re1, !3 = $re2, !4 = $re3, !5 = $regex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, '2014-14-26T00%3A00%3A00'
    7     2        ASSIGN                                                   !2, '%28%28%3F%3A%28%3F%3A%5B1%5D%7B1%7D%5Cd%7B1%7D%5Cd%7B1%7D%5Cd%7B1%7D%29%7C%28%3F%3A%5B2%5D%7B1%7D%5Cd%7B3%7D%29%29%5B-%3A%5C%2F.%5D%28%3F%3A%5B0%5D%3F%5B1-9%5D%7C%5B1%5D%5B012%5D%29%5B-%3A%5C%2F.%5D%28%3F%3A%28%3F%3A%5B0-2%5D%3F%5Cd%7B1%7D%29%7C%28%3F%3A%5B3%5D%5B01%5D%7B1%7D%29%29%29%28%3F%21%5B%5Cd%5D%29'
    8     3        ASSIGN                                                   !3, '%28T%29'
    9     4        ASSIGN                                                   !4, '%28%28%3F%3A%28%3F%3A%5B0-1%5D%5B0-9%5D%29%7C%28%3F%3A%5B2%5D%5B0-3%5D%29%7C%28%3F%3A%5B0-9%5D%29%29%3A%28%3F%3A%5B0-5%5D%5B0-9%5D%29%28%3F%3A%3A%5B0-5%5D%5B0-9%5D%29%3F%28%3F%3A%5Cs%3F%28%3F%3Aam%7CAM%7Cpm%7CPM%29%29%3F%29'
   11     5        ASSIGN                                                   !5, '%28%5Cd%7B4%7D%29-%28%5Cd%7B2%7D%29-%28%5Cd%7B2%7D%29+%28%5Cd%7B2%7D%29%3A%28%5Cd%7B2%7D%29%3A%28%5Cd%7B2%7D%29'
   16     6        INIT_FCALL                                               'preg_match'
          7        SEND_VAR                                                 !5
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $12     
         10      > JMPZ                                                     $12, ->19
   17    11    >   ASSIGN_DIM                                               !0, 'status'
         12        OP_DATA                                                  'error'
   18    13        ASSIGN_DIM                                               !0, 'reason'
         14        OP_DATA                                                  'not+valid+date'
   19    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > JMP                                                      ->26
   23    19    >   ASSIGN_DIM                                               !0, 'status'
         20        OP_DATA                                                  'ok'
   24    21        ASSIGN_DIM                                               !0, 'reason'
         22        OP_DATA                                                  'valid+date'
   25    23        INIT_FCALL                                               'print_r'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                                 
   26    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.33 ms | 1396 KiB | 17 Q