3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startPointer = new DateTime('2015-04-01'); $endPointer = new DateTime('2015-04-01'); print_r($startPointer); print_r($endPointer); $step = new DateInterval('P1D'); $startPointer->add($step); $endPointer->add($step); print_r($startPointer); print_r($endPointer);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SkfhY
function name:  (null)
number of ops:  31
compiled vars:  !0 = $startPointer, !1 = $endPointer, !2 = $step
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '2015-04-01'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    5     4        NEW                                              $6      'DateTime'
          5        SEND_VAL_EX                                              '2015-04-01'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    8     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
    9    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   11    14        NEW                                              $11     'DateInterval'
         15        SEND_VAL_EX                                              'P1D'
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !2, $11
   13    18        INIT_METHOD_CALL                                         !0, 'add'
         19        SEND_VAR_EX                                              !2
         20        DO_FCALL                                      0          
   14    21        INIT_METHOD_CALL                                         !1, 'add'
         22        SEND_VAR_EX                                              !2
         23        DO_FCALL                                      0          
   17    24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                                 
   18    27        INIT_FCALL                                               'print_r'
         28        SEND_VAR                                                 !1
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
205.58 ms | 1395 KiB | 15 Q