3v4l.org

run code in 300+ PHP versions simultaneously
<?php $period = new DatePeriod( new DateTime(date('Y-m-d', time())), new DateInterval('P1D'), new DateTime(date('Y-m-d', strtotime('+3 DAYS'))) ); foreach(array('foo', 'bar') as $a) { var_dump($a); foreach ($period as $date) { var_dump(date('d-m-Y', $date->getTimestamp())); } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 29, Position 2 = 47
Branch analysis from position: 29
2 jumps found. (Code = 78) Position 1 = 30, Position 2 = 47
Branch analysis from position: 30
2 jumps found. (Code = 77) Position 1 = 34, Position 2 = 45
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 45
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 45
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
filename:       /in/aBcEG
function name:  (null)
number of ops:  49
compiled vars:  !0 = $period, !1 = $a, !2 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DatePeriod'
    4     1        NEW                                              $4      'DateTime'
          2        INIT_FCALL                                               'date'
          3        SEND_VAL                                                 'Y-m-d'
          4        INIT_FCALL                                               'time'
          5        DO_ICALL                                         $5      
          6        SEND_VAR                                                 $5
          7        DO_ICALL                                         $6      
          8        SEND_VAR_NO_REF_EX                                       $6
          9        DO_FCALL                                      0          
         10        SEND_VAR_NO_REF_EX                                       $4
    5    11        NEW                                              $8      'DateInterval'
         12        SEND_VAL_EX                                              'P1D'
         13        DO_FCALL                                      0          
         14        SEND_VAR_NO_REF_EX                                       $8
    6    15        NEW                                              $10     'DateTime'
         16        INIT_FCALL                                               'date'
         17        SEND_VAL                                                 'Y-m-d'
         18        INIT_FCALL                                               'strtotime'
         19        SEND_VAL                                                 '%2B3+DAYS'
         20        DO_ICALL                                         $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                         $12     
         23        SEND_VAR_NO_REF_EX                                       $12
         24        DO_FCALL                                      0          
         25        SEND_VAR_NO_REF_EX                                       $10
         26        DO_FCALL                                      0          
    3    27        ASSIGN                                                   !0, $3
    9    28      > FE_RESET_R                                       $16     <array>, ->47
         29    > > FE_FETCH_R                                               $16, !1, ->47
   10    30    >   INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !1
         32        DO_ICALL                                                 
   11    33      > FE_RESET_R                                       $18     !0, ->45
         34    > > FE_FETCH_R                                               $18, !2, ->45
   12    35    >   INIT_FCALL                                               'var_dump'
         36        INIT_FCALL                                               'date'
         37        SEND_VAL                                                 'd-m-Y'
         38        INIT_METHOD_CALL                                         !2, 'getTimestamp'
         39        DO_FCALL                                      0  $19     
         40        SEND_VAR                                                 $19
         41        DO_ICALL                                         $20     
         42        SEND_VAR                                                 $20
         43        DO_ICALL                                                 
   11    44      > JMP                                                      ->34
         45    >   FE_FREE                                                  $18
    9    46      > JMP                                                      ->29
         47    >   FE_FREE                                                  $16
   16    48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.58 ms | 1400 KiB | 21 Q