3v4l.org

run code in 300+ PHP versions simultaneously
<?php $period = new DatePeriod( new DateTimeImmutable('2010-05-01'), new DateInterval('P1D'), new DateTimeImmutable('2010-05-10') ); $iteratorOutput = $arrayOutput = ''; foreach ($period as $date) { $iteratorOutput .= $date->format("l Y-m-d H:i:s\n"); } var_dump($iteratorOutput ); foreach (iterator_to_array($period) as $date) { $arrayOutput .= $date->format("l Y-m-d H:i:s\n"); } var_dump($arrayOutput );
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 = 32, Position 2 = 38
Branch analysis from position: 32
2 jumps found. (Code = 78) Position 1 = 33, Position 2 = 38
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
Branch analysis from position: 24
filename:       /in/eGQO3
function name:  (null)
number of ops:  43
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      'DateTimeImmutable'
          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      'DateTimeImmutable'
         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
   13    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
   15    28        INIT_FCALL                                               'iterator_to_array'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $19     
         31      > FE_RESET_R                                       $20     $19, ->38
         32    > > FE_FETCH_R                                               $20, !3, ->38
   16    33    >   INIT_METHOD_CALL                                         !3, 'format'
         34        SEND_VAL_EX                                              'l+Y-m-d+H%3Ai%3As%0A'
         35        DO_FCALL                                      0  $21     
         36        ASSIGN_OP                                     8          !2, $21
   15    37      > JMP                                                      ->32
         38    >   FE_FREE                                                  $20
   19    39        INIT_FCALL                                               'var_dump'
         40        SEND_VAR                                                 !2
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.36 ms | 1400 KiB | 17 Q