3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (range(0,8) as $days) { $a1 = new DateTime('2016-03-07 18:02:40'); $a1->modify("+$days days"); $a1->modify('next week'); echo $days . PHP_EOL; var_dump($a1->format('d/m/Y')); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 28
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 28
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/qZumd
function name:  (null)
number of ops:  30
compiled vars:  !0 = $days, !1 = $a1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 8
          3        DO_ICALL                                         $2      
          4      > FE_RESET_R                                       $3      $2, ->28
          5    > > FE_FETCH_R                                               $3, !0, ->28
    4     6    >   NEW                                              $4      'DateTime'
          7        SEND_VAL_EX                                              '2016-03-07+18%3A02%3A40'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $4
    5    10        INIT_METHOD_CALL                                         !1, 'modify'
         11        ROPE_INIT                                     3  ~8      '%2B'
         12        ROPE_ADD                                      1  ~8      ~8, !0
         13        ROPE_END                                      2  ~7      ~8, '+days'
         14        SEND_VAL_EX                                              ~7
         15        DO_FCALL                                      0          
    6    16        INIT_METHOD_CALL                                         !1, 'modify'
         17        SEND_VAL_EX                                              'next+week'
         18        DO_FCALL                                      0          
    7    19        CONCAT                                           ~12     !0, '%0A'
         20        ECHO                                                     ~12
    8    21        INIT_FCALL                                               'var_dump'
         22        INIT_METHOD_CALL                                         !1, 'format'
         23        SEND_VAL_EX                                              'd%2Fm%2FY'
         24        DO_FCALL                                      0  $13     
         25        SEND_VAR                                                 $13
         26        DO_ICALL                                                 
    3    27      > JMP                                                      ->5
         28    >   FE_FREE                                                  $3
    9    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
195.88 ms | 1396 KiB | 17 Q