3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d1=date_create('2009-12-25'); $i=DateInterval::createFromDateString('1 year'); $d2=date_create('2004-03-03'); $p=new DatePeriod($d2,$i,$d1); foreach($p as $d) { echo $d->format('Y-m-d') . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/ucso1
function name:  (null)
number of ops:  28
compiled vars:  !0 = $d1, !1 = $i, !2 = $d2, !3 = $p, !4 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_create'
          1        SEND_VAL                                                 '2009-12-25'
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
    4     4        INIT_STATIC_METHOD_CALL                                  'DateInterval', 'createFromDateString'
          5        SEND_VAL                                                 '1+year'
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !1, $7
    5     8        INIT_FCALL                                               'date_create'
          9        SEND_VAL                                                 '2004-03-03'
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
    6    12        NEW                                              $11     'DatePeriod'
         13        SEND_VAR_EX                                              !2
         14        SEND_VAR_EX                                              !1
         15        SEND_VAR_EX                                              !0
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !3, $11
    7    18      > FE_RESET_R                                       $14     !3, ->26
         19    > > FE_FETCH_R                                               $14, !4, ->26
    8    20    >   INIT_METHOD_CALL                                         !4, 'format'
         21        SEND_VAL_EX                                              'Y-m-d'
         22        DO_FCALL                                      0  $15     
         23        CONCAT                                           ~16     $15, '%0A'
         24        ECHO                                                     ~16
    7    25      > JMP                                                      ->19
         26    >   FE_FREE                                                  $14
    9    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.26 ms | 1396 KiB | 15 Q