3v4l.org

run code in 300+ PHP versions simultaneously
<?php for( $y = 2000; $y < 2020; $y++) { echo (new \DateTime('now'))->setIsoDate($y . '','26')->modify('next sunday')->format('Y-m-d') . "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 2
Branch analysis from position: 21
Branch analysis from position: 2
filename:       /in/KW2sl
function name:  (null)
number of ops:  22
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2000
          1      > JMP                                                      ->19
    4     2    >   NEW                                              $2      'DateTime'
          3        SEND_VAL_EX                                              'now'
          4        DO_FCALL                                      0          
          5        INIT_METHOD_CALL                                         $2, 'setIsoDate'
          6        CONCAT                                           ~4      !0, ''
          7        SEND_VAL_EX                                              ~4
          8        SEND_VAL_EX                                              '26'
          9        DO_FCALL                                      0  $5      
         10        INIT_METHOD_CALL                                         $5, 'modify'
         11        SEND_VAL_EX                                              'next+sunday'
         12        DO_FCALL                                      0  $6      
         13        INIT_METHOD_CALL                                         $6, 'format'
         14        SEND_VAL_EX                                              'Y-m-d'
         15        DO_FCALL                                      0  $7      
         16        CONCAT                                           ~8      $7, '%0A'
         17        ECHO                                                     ~8
    3    18        PRE_INC                                                  !0
         19    >   IS_SMALLER                                               !0, 2020
         20      > JMPNZ                                                    ~10, ->2
    5    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.15 ms | 1394 KiB | 13 Q