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"); var_dump($a1->modify('next week')); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 23
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 23
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/No5UM
function name:  (null)
number of ops:  25
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, ->23
          5    > > FE_FETCH_R                                               $3, !0, ->23
    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_FCALL                                               'var_dump'
         17        INIT_METHOD_CALL                                         !1, 'modify'
         18        SEND_VAL_EX                                              'next+week'
         19        DO_FCALL                                      0  $11     
         20        SEND_VAR                                                 $11
         21        DO_ICALL                                                 
    3    22      > JMP                                                      ->5
         23    >   FE_FREE                                                  $3
    7    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.58 ms | 1395 KiB | 17 Q