3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_month_first_day = new DateTime('first day of this month'); // first day of the current month $current_month_last_day = date('t'); // last day of the current month $interval = new DateInterval('P1D'); $period = new DatePeriod($current_month_first_day, $interval, $current_month_last_day - 1); print_r($period); ?> <!-- Sitting Date START --> <div class="sitting-days"> <h4 style="text-align:center;">Select Date</h4> <?php foreach ($period as $date){ ?> <div class="select-date" style="margin-right:30px; margin-top:20px;"> <input type="date" class="house-sitting-date" name="house_sitting_date[]" value="<?php echo $date->format("Y-m-d"); ?>"> </div> <?php } ?> </div> <!-- Sitting Date END -->

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 24, Position 2 = 32
Branch analysis from position: 24
2 jumps found. (Code = 78) Position 1 = 25, Position 2 = 32
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/mf96r
function name:  (null)
number of ops:  35
compiled vars:  !0 = $current_month_first_day, !1 = $current_month_last_day, !2 = $interval, !3 = $period, !4 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'DateTime'
          1        SEND_VAL_EX                                              'first+day+of+this+month'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
    4     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 't'
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !1, $8
    5     8        NEW                                              $10     'DateInterval'
          9        SEND_VAL_EX                                              'P1D'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $10
    6    12        NEW                                              $13     'DatePeriod'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !2
         15        SUB                                              ~14     !1, 1
         16        SEND_VAL_EX                                              ~14
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !3, $13
    7    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
    8    22        ECHO                                                     '++%0A%0A%3C%21--+Sitting+Date+START+--%3E%0A%3Cdiv+class%3D%22sitting-days%22%3E%0A+++%3Ch4+style%3D%22text-align%3Acenter%3B%22%3ESelect+Date%3C%2Fh4%3E%0A+++'
   13    23      > FE_RESET_R                                       $18     !3, ->32
         24    > > FE_FETCH_R                                               $18, !4, ->32
   14    25    >   ECHO                                                     '+++%3Cdiv+class%3D%22select-date%22+style%3D%22margin-right%3A30px%3B+margin-top%3A20px%3B%22%3E%0A++++++%3Cinput+type%3D%22date%22+class%3D%22house-sitting-date%22+name%3D%22house_sitting_date%5B%5D%22+value%3D%22'
   15    26        INIT_METHOD_CALL                                         !4, 'format'
         27        SEND_VAL_EX                                              'Y-m-d'
         28        DO_FCALL                                      0  $19     
         29        ECHO                                                     $19
         30        ECHO                                                     '%22%3E%0A+++%3C%2Fdiv%3E%0A+++'
   13    31      > JMP                                                      ->24
         32    >   FE_FREE                                                  $18
   18    33        ECHO                                                     '%3C%2Fdiv%3E%0A%3C%21--+Sitting+Date+END+--%3E'
   19    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.24 ms | 1008 KiB | 15 Q