3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_GET['week_of'])&&preg_match('/^[0-9]{8}$/',$_GET['week_of'])){ $week_of=DateTime::createFromFormat('Ymd',$_GET['week_of']); }else{ $week_of=0; } echo $week_of;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/kKSBJ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $week_of
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_IS                                         ~1      '_GET'
          1        ISSET_ISEMPTY_DIM_OBJ                         0  ~2      ~1, 'week_of'
          2      > JMPZ_EX                                          ~2      ~2, ->10
          3    >   INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%5E%5B0-9%5D%7B8%7D%24%2F'
          5        FETCH_R                      global              ~3      '_GET'
          6        FETCH_DIM_R                                      ~4      ~3, 'week_of'
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                         $5      
          9        BOOL                                             ~2      $5
         10    > > JMPZ                                                     ~2, ->19
    3    11    >   INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         12        SEND_VAL                                                 'Ymd'
         13        FETCH_R                      global              ~6      '_GET'
         14        FETCH_DIM_R                                      ~7      ~6, 'week_of'
         15        SEND_VAL                                                 ~7
         16        DO_FCALL                                      0  $8      
         17        ASSIGN                                                   !0, $8
         18      > JMP                                                      ->20
    5    19    >   ASSIGN                                                   !0, 0
    7    20    >   ECHO                                                     !0
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.44 ms | 1395 KiB | 15 Q