3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = strtotime('20016-02-05'); $end = strtotime('2016-04-05'); $start_m = new DateTime('20016-02-05'); $end_m = new DateTime('2016-04-05'); $start_m->modify('first day of this month'); $end_m->modify('first day of next month'); $interval = DateInterval::createFromDateString('1 month'); $period = new DatePeriod($start_m, $interval, $end_m); print_r($date_range_m);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LSpe0
function name:  (null)
number of ops:  36
compiled vars:  !0 = $start, !1 = $end, !2 = $start_m, !3 = $end_m, !4 = $interval, !5 = $period, !6 = $date_range_m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '20016-02-05'
          2        DO_ICALL                                         $7      
          3        ASSIGN                                                   !0, $7
    4     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '2016-04-05'
          6        DO_ICALL                                         $9      
          7        ASSIGN                                                   !1, $9
    5     8        NEW                                              $11     'DateTime'
          9        SEND_VAL_EX                                              '20016-02-05'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $11
    6    12        NEW                                              $14     'DateTime'
         13        SEND_VAL_EX                                              '2016-04-05'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !3, $14
    7    16        INIT_METHOD_CALL                                         !2, 'modify'
         17        SEND_VAL_EX                                              'first+day+of+this+month'
         18        DO_FCALL                                      0          
    8    19        INIT_METHOD_CALL                                         !3, 'modify'
         20        SEND_VAL_EX                                              'first+day+of+next+month'
         21        DO_FCALL                                      0          
    9    22        INIT_STATIC_METHOD_CALL                                  'DateInterval', 'createFromDateString'
         23        SEND_VAL                                                 '1+month'
         24        DO_FCALL                                      0  $19     
         25        ASSIGN                                                   !4, $19
   10    26        NEW                                              $21     'DatePeriod'
         27        SEND_VAR_EX                                              !2
         28        SEND_VAR_EX                                              !4
         29        SEND_VAR_EX                                              !3
         30        DO_FCALL                                      0          
         31        ASSIGN                                                   !5, $21
   13    32        INIT_FCALL                                               'print_r'
         33        SEND_VAR                                                 !6
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.1 ms | 1396 KiB | 17 Q