3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startDate = new DateTime('@' . mktime(0, 0, 0, date("m"), date("d") - 7, date("Y"))); $optionalStartDate = '2018-01-01 00:00:00'; print_r($startDate);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gVc6l
function name:  (null)
number of ops:  28
compiled vars:  !0 = $startDate, !1 = $optionalStartDate
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'DateTime'
          1        INIT_FCALL                                               'mktime'
          2        SEND_VAL                                                 0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 0
          5        INIT_FCALL                                               'date'
          6        SEND_VAL                                                 'm'
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        INIT_FCALL                                               'date'
         10        SEND_VAL                                                 'd'
         11        DO_ICALL                                         $4      
         12        SUB                                              ~5      $4, 7
         13        SEND_VAL                                                 ~5
         14        INIT_FCALL                                               'date'
         15        SEND_VAL                                                 'Y'
         16        DO_ICALL                                         $6      
         17        SEND_VAR                                                 $6
         18        DO_ICALL                                         $7      
         19        CONCAT                                           ~8      '%40', $7
         20        SEND_VAL_EX                                              ~8
         21        DO_FCALL                                      0          
         22        ASSIGN                                                   !0, $2
    3    23        ASSIGN                                                   !1, '2018-01-01+00%3A00%3A00'
    5    24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.74 ms | 1387 KiB | 19 Q