3v4l.org

run code in 300+ PHP versions simultaneously
<?php $period = new DatePeriod( new DateTime('2010-05-01'), new DateInterval('P1D'), new DateTime('2010-05-10') ); $iteratorOutput = $arrayOutput = ''; foreach ($period as $date) { $iteratorOutput .= $date->format("l Y-m-d H:i:s\n"); } foreach (iterator_to_array($period) as $date) { $arrayOutput .= $date->format("l Y-m-d H:i:s\n"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 24
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 24
2 jumps found. (Code = 77) Position 1 = 29, Position 2 = 35
Branch analysis from position: 29
2 jumps found. (Code = 78) Position 1 = 30, Position 2 = 35
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
Branch analysis from position: 24
filename:       /in/vTh6U
function name:  (null)
number of ops:  37
compiled vars:  !0 = $period, !1 = $iteratorOutput, !2 = $arrayOutput, !3 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DatePeriod'
    4     1        NEW                                              $5      'DateTime'
          2        SEND_VAL_EX                                              '2010-05-01'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $5
    5     5        NEW                                              $7      'DateInterval'
          6        SEND_VAL_EX                                              'P1D'
          7        DO_FCALL                                      0          
          8        SEND_VAR_NO_REF_EX                                       $7
    6     9        NEW                                              $9      'DateTime'
         10        SEND_VAL_EX                                              '2010-05-10'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $9
         13        DO_FCALL                                      0          
    3    14        ASSIGN                                                   !0, $4
    8    15        ASSIGN                                           ~13     !2, ''
         16        ASSIGN                                                   !1, ~13
   10    17      > FE_RESET_R                                       $15     !0, ->24
         18    > > FE_FETCH_R                                               $15, !3, ->24
   11    19    >   INIT_METHOD_CALL                                         !3, 'format'
         20        SEND_VAL_EX                                              'l+Y-m-d+H%3Ai%3As%0A'
         21        DO_FCALL                                      0  $16     
         22        ASSIGN_OP                                     8          !1, $16
   10    23      > JMP                                                      ->18
         24    >   FE_FREE                                                  $15
   14    25        INIT_FCALL                                               'iterator_to_array'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $18     
         28      > FE_RESET_R                                       $19     $18, ->35
         29    > > FE_FETCH_R                                               $19, !3, ->35
   15    30    >   INIT_METHOD_CALL                                         !3, 'format'
         31        SEND_VAL_EX                                              'l+Y-m-d+H%3Ai%3As%0A'
         32        DO_FCALL                                      0  $20     
         33        ASSIGN_OP                                     8          !2, $20
   14    34      > JMP                                                      ->29
         35    >   FE_FREE                                                  $19
   16    36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.59 ms | 1400 KiB | 15 Q