3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month = 2; //date("n"); $day = 16; //date("j"); $year = 2014; //date("Y"); if ($day > 15) { $day = 1; } else { if ($month == 1) { $month = 12; $year--; $day = 16; } else { $month--; $day = 16; } } $daysinmonth = date("t", strtotime("$year - $month - $day")); $out = strtotime($year."-".$month."-".$day); //$rangeEnd = date("Y-m-d 23:59:59", strtotime("last month")); //$rangeStart = date("Y-m-d 00:00:00", strtotime($rangeEnd." -6 days")); echo "$year $month $day $daysinmonth $out"; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5pUvs
function name:  (null)
number of ops:  47
compiled vars:  !0 = $month, !1 = $day, !2 = $year, !3 = $daysinmonth, !4 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 2
    3     1        ASSIGN                                                   !1, 16
    4     2        ASSIGN                                                   !2, 2014
    6     3        IS_SMALLER                                               15, !1
          4      > JMPZ                                                     ~8, ->7
    7     5    >   ASSIGN                                                   !1, 1
          6      > JMP                                                      ->15
    9     7    >   IS_EQUAL                                                 !0, 1
          8      > JMPZ                                                     ~10, ->13
   10     9    >   ASSIGN                                                   !0, 12
   11    10        PRE_DEC                                                  !2
   12    11        ASSIGN                                                   !1, 16
         12      > JMP                                                      ->15
   14    13    >   PRE_DEC                                                  !0
   15    14        ASSIGN                                                   !1, 16
   18    15    >   INIT_FCALL                                               'date'
         16        SEND_VAL                                                 't'
         17        INIT_FCALL                                               'strtotime'
         18        ROPE_INIT                                     5  ~17     !2
         19        ROPE_ADD                                      1  ~17     ~17, '+-+'
         20        ROPE_ADD                                      2  ~17     ~17, !0
         21        ROPE_ADD                                      3  ~17     ~17, '+-+'
         22        ROPE_END                                      4  ~16     ~17, !1
         23        SEND_VAL                                                 ~16
         24        DO_ICALL                                         $20     
         25        SEND_VAR                                                 $20
         26        DO_ICALL                                         $21     
         27        ASSIGN                                                   !3, $21
   19    28        INIT_FCALL                                               'strtotime'
         29        CONCAT                                           ~23     !2, '-'
         30        CONCAT                                           ~24     ~23, !0
         31        CONCAT                                           ~25     ~24, '-'
         32        CONCAT                                           ~26     ~25, !1
         33        SEND_VAL                                                 ~26
         34        DO_ICALL                                         $27     
         35        ASSIGN                                                   !4, $27
   25    36        ROPE_INIT                                     9  ~30     !2
         37        ROPE_ADD                                      1  ~30     ~30, '+'
         38        ROPE_ADD                                      2  ~30     ~30, !0
         39        ROPE_ADD                                      3  ~30     ~30, '+'
         40        ROPE_ADD                                      4  ~30     ~30, !1
         41        ROPE_ADD                                      5  ~30     ~30, '++++'
         42        ROPE_ADD                                      6  ~30     ~30, !3
         43        ROPE_ADD                                      7  ~30     ~30, '++++++++++++++'
         44        ROPE_END                                      8  ~29     ~30, !4
         45        ECHO                                                     ~29
   27    46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.94 ms | 1400 KiB | 17 Q