3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.89 ms | 1395 KiB | 15 Q