3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime(gmdate('Y-m-d H:i:s')); $SubscriptionsChangesLastRequest = (string)$now->format('Y-m-d H:i:s'); if (isset($request->Data->LastDate)) { try { $tmp = new DateTime($request->Data->LastDate); $LastDate = (string)$tmp->format('Y-m-d H:i:s'); } catch (Exception $e) { $LastDate = $SubscriptionsChangesLastRequest; } } if (!isset($LastDate) && isset($_SESSION['SubscriptionsChangesLastRequest'])) { $LastDate = $_SESSION['SubscriptionsChangesLastRequest']; } else { $now->sub(new DateInterval('P1DT15M')); $LastDate = (string)$now->format('Y-m-d H:i:s'); } echo $LastDate;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 30
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 46) Position 1 = 33, Position 2 = 36
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 41
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
Branch analysis from position: 30
Found catch point at position: 28
Branch analysis from position: 28
2 jumps found. (Code = 107) Position 1 = 29, Position 2 = -2
Branch analysis from position: 29
2 jumps found. (Code = 46) Position 1 = 33, Position 2 = 36
Branch analysis from position: 33
Branch analysis from position: 36
filename:       /in/BQ01S
function name:  (null)
number of ops:  54
compiled vars:  !0 = $now, !1 = $SubscriptionsChangesLastRequest, !2 = $request, !3 = $tmp, !4 = $LastDate, !5 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $6      'DateTime'
          1        INIT_FCALL                                               'gmdate'
          2        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          3        DO_ICALL                                         $7      
          4        SEND_VAR_NO_REF_EX                                       $7
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $6
    4     7        INIT_METHOD_CALL                                         !0, 'format'
          8        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
          9        DO_FCALL                                      0  $10     
         10        CAST                                          6  ~11     $10
         11        ASSIGN                                                   !1, ~11
    5    12        FETCH_OBJ_IS                                     ~13     !2, 'Data'
         13        ISSET_ISEMPTY_PROP_OBJ                                   ~13, 'LastDate'
         14      > JMPZ                                                     ~14, ->30
    7    15    >   NEW                                              $15     'DateTime'
         16        CHECK_FUNC_ARG                                           
         17        FETCH_OBJ_FUNC_ARG                               $16     !2, 'Data'
         18        FETCH_OBJ_FUNC_ARG                               $17     $16, 'LastDate'
         19        SEND_FUNC_ARG                                            $17
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !3, $15
    8    22        INIT_METHOD_CALL                                         !3, 'format'
         23        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         24        DO_FCALL                                      0  $20     
         25        CAST                                          6  ~21     $20
         26        ASSIGN                                                   !4, ~21
         27      > JMP                                                      ->30
    9    28  E > > CATCH                                       last         'Exception'
   10    29    >   ASSIGN                                                   !4, !1
   14    30    >   ISSET_ISEMPTY_CV                                 ~24     !4
         31        BOOL_NOT                                         ~25     ~24
         32      > JMPZ_EX                                          ~25     ~25, ->36
         33    >   FETCH_IS                                         ~26     '_SESSION'
         34        ISSET_ISEMPTY_DIM_OBJ                         0  ~27     ~26, 'SubscriptionsChangesLastRequest'
         35        BOOL                                             ~25     ~27
         36    > > JMPZ                                                     ~25, ->41
   15    37    >   FETCH_R                      global              ~28     '_SESSION'
         38        FETCH_DIM_R                                      ~29     ~28, 'SubscriptionsChangesLastRequest'
         39        ASSIGN                                                   !4, ~29
         40      > JMP                                                      ->52
   17    41    >   INIT_METHOD_CALL                                         !0, 'sub'
         42        NEW                                              $31     'DateInterval'
         43        SEND_VAL_EX                                              'P1DT15M'
         44        DO_FCALL                                      0          
         45        SEND_VAR_NO_REF_EX                                       $31
         46        DO_FCALL                                      0          
   18    47        INIT_METHOD_CALL                                         !0, 'format'
         48        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         49        DO_FCALL                                      0  $34     
         50        CAST                                          6  ~35     $34
         51        ASSIGN                                                   !4, ~35
   20    52    >   ECHO                                                     !4
         53      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.4 ms | 1400 KiB | 15 Q