3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Asia/Singapore'); define('LF', "\n"); define('DATE_FORMAT', 'Y-m-d H:i:s'); $end_date = new DateTime('today'); $end_date->modify('first day of next month'); $sumend_timestamp = $end_date->getTimestamp(); if ($emember_flag) : $intervalSpec = 'P3M'; else : $intervalSpec = 'P1Y'; endif; $upgrade_interval = new DateInterval($intervalSpec); $start_date = clone $end_date; $start_date->sub($upgrade_interval); $sumstart_timestamp = $start_date->getTimestamp(); echo date(DATE_FORMAT, $sumend_timestamp) . LF; echo date(DATE_FORMAT, $sumstart_timestamp) . LF;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TKr6V
function name:  (null)
number of ops:  54
compiled vars:  !0 = $end_date, !1 = $sumend_timestamp, !2 = $emember_flag, !3 = $intervalSpec, !4 = $upgrade_interval, !5 = $start_date, !6 = $sumstart_timestamp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'Asia%2FSingapore'
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'define'
          4        SEND_VAL                                                 'LF'
          5        SEND_VAL                                                 '%0A'
          6        DO_ICALL                                                 
    5     7        INIT_FCALL                                               'define'
          8        SEND_VAL                                                 'DATE_FORMAT'
          9        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         10        DO_ICALL                                                 
    7    11        NEW                                              $10     'DateTime'
         12        SEND_VAL_EX                                              'today'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !0, $10
    8    15        INIT_METHOD_CALL                                         !0, 'modify'
         16        SEND_VAL_EX                                              'first+day+of+next+month'
         17        DO_FCALL                                      0          
    9    18        INIT_METHOD_CALL                                         !0, 'getTimestamp'
         19        DO_FCALL                                      0  $14     
         20        ASSIGN                                                   !1, $14
   11    21      > JMPZ                                                     !2, ->24
   12    22    >   ASSIGN                                                   !3, 'P3M'
         23      > JMP                                                      ->25
   14    24    >   ASSIGN                                                   !3, 'P1Y'
   17    25    >   NEW                                              $18     'DateInterval'
         26        SEND_VAR_EX                                              !3
         27        DO_FCALL                                      0          
         28        ASSIGN                                                   !4, $18
   19    29        CLONE                                            ~21     !0
         30        ASSIGN                                                   !5, ~21
   20    31        INIT_METHOD_CALL                                         !5, 'sub'
         32        SEND_VAR_EX                                              !4
         33        DO_FCALL                                      0          
   21    34        INIT_METHOD_CALL                                         !5, 'getTimestamp'
         35        DO_FCALL                                      0  $24     
         36        ASSIGN                                                   !6, $24
   23    37        INIT_FCALL                                               'date'
         38        FETCH_CONSTANT                                   ~26     'DATE_FORMAT'
         39        SEND_VAL                                                 ~26
         40        SEND_VAR                                                 !1
         41        DO_ICALL                                         $27     
         42        FETCH_CONSTANT                                   ~28     'LF'
         43        CONCAT                                           ~29     $27, ~28
         44        ECHO                                                     ~29
   24    45        INIT_FCALL                                               'date'
         46        FETCH_CONSTANT                                   ~30     'DATE_FORMAT'
         47        SEND_VAL                                                 ~30
         48        SEND_VAR                                                 !6
         49        DO_ICALL                                         $31     
         50        FETCH_CONSTANT                                   ~32     'LF'
         51        CONCAT                                           ~33     $31, ~32
         52        ECHO                                                     ~33
         53      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.66 ms | 1400 KiB | 19 Q