3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0;$d= new DatePeriod(new DateTime(),DateInterval::createFromDateString("Monday"), new DateTime("2014-11-31")); foreach($d as $day){ if($i++ > 20) break; echo $day->format("c").PHP_EOL;}
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 27
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 27
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 27
Branch analysis from position: 27
filename:       /in/TtB9R
function name:  (null)
number of ops:  29
compiled vars:  !0 = $i, !1 = $d, !2 = $day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
          1        NEW                                              $4      'DatePeriod'
          2        NEW                                              $5      'DateTime'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $5
          5        INIT_STATIC_METHOD_CALL                                  'DateInterval', 'createFromDateString'
          6        SEND_VAL                                                 'Monday'
          7        DO_FCALL                                      0  $7      
          8        SEND_VAR_NO_REF_EX                                       $7
          9        NEW                                              $8      'DateTime'
         10        SEND_VAL_EX                                              '2014-11-31'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $8
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !1, $4
         15      > FE_RESET_R                                       $12     !1, ->27
         16    > > FE_FETCH_R                                               $12, !2, ->27
         17    >   POST_INC                                         ~13     !0
         18        IS_SMALLER                                               20, ~13
         19      > JMPZ                                                     ~14, ->21
         20    > > JMP                                                      ->27
         21    >   INIT_METHOD_CALL                                         !2, 'format'
         22        SEND_VAL_EX                                              'c'
         23        DO_FCALL                                      0  $15     
         24        CONCAT                                           ~16     $15, '%0A'
         25        ECHO                                                     ~16
         26      > JMP                                                      ->16
         27    >   FE_FREE                                                  $12
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.36 ms | 1395 KiB | 13 Q