3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = new \DateTime('previous month'); $from = clone $d; $to = clone $d; $from->modify('first day of this month midnight'); $to->modify('last day of this month 23:59:59.999999'); var_dump($from); var_dump($to);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SBKgk
function name:  (null)
number of ops:  21
compiled vars:  !0 = $d, !1 = $from, !2 = $to
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              'previous+month'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        CLONE                                            ~6      !0
          5        ASSIGN                                                   !1, ~6
    5     6        CLONE                                            ~8      !0
          7        ASSIGN                                                   !2, ~8
    6     8        INIT_METHOD_CALL                                         !1, 'modify'
          9        SEND_VAL_EX                                              'first+day+of+this+month+midnight'
         10        DO_FCALL                                      0          
    7    11        INIT_METHOD_CALL                                         !2, 'modify'
         12        SEND_VAL_EX                                              'last+day+of+this+month+23%3A59%3A59.999999'
         13        DO_FCALL                                      0          
    9    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
   10    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.13 ms | 1395 KiB | 15 Q