3v4l.org

run code in 500+ PHP versions simultaneously
<?php $start = new DateTime("-2 months"); $end = clone $start; $start->modify("first day of this month"); $end->modify("last day of this month"); echo $start->format("Y-m-d")." - ".$end->format("Y-m-d");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/udGtE
function name:  (null)
number of ops:  22
compiled vars:  !0 = $start, !1 = $end
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $2      'DateTime'
          1        SEND_VAL_EX                                                  '-2+months'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $2
    4     4        CLONE                                                ~5      !0
          5        ASSIGN                                                       !1, ~5
    5     6        INIT_METHOD_CALL                                             !0, 'modify'
          7        SEND_VAL_EX                                                  'first+day+of+this+month'
          8        DO_FCALL                                          0          
    6     9        INIT_METHOD_CALL                                             !1, 'modify'
         10        SEND_VAL_EX                                                  'last+day+of+this+month'
         11        DO_FCALL                                          0          
    7    12        INIT_METHOD_CALL                                             !0, 'format'
         13        SEND_VAL_EX                                                  'Y-m-d'
         14        DO_FCALL                                          0  $9      
         15        CONCAT                                               ~10     $9, '+-+'
         16        INIT_METHOD_CALL                                             !1, 'format'
         17        SEND_VAL_EX                                                  'Y-m-d'
         18        DO_FCALL                                          0  $11     
         19        CONCAT                                               ~12     ~10, $11
         20        ECHO                                                         ~12
         21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
222.48 ms | 2316 KiB | 13 Q