3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.79 ms | 945 KiB | 18 Q