3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startYear = 2010; $array = []; for ($x = $startYear; $x <= date('Y'); $x ++) { $date = DateTime::createFromFormat('Y-m-d\TH:i:s', $x . '-01-01T00:00:00'); $array[$x] = $date->format('Y-m-d\TH:i:s'); } var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
Branch analysis from position: 4
filename:       /in/9gVRg
function name:  (null)
number of ops:  25
compiled vars:  !0 = $startYear, !1 = $array, !2 = $x, !3 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2010
    4     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, !0
          3      > JMP                                                      ->16
    7     4    >   INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          5        SEND_VAL                                                 'Y-m-d%5CTH%3Ai%3As'
          6        CONCAT                                           ~7      !2, '-01-01T00%3A00%3A00'
          7        SEND_VAL                                                 ~7
          8        DO_FCALL                                      0  $8      
          9        ASSIGN                                                   !3, $8
    8    10        INIT_METHOD_CALL                                         !3, 'format'
         11        SEND_VAL_EX                                              'Y-m-d%5CTH%3Ai%3As'
         12        DO_FCALL                                      0  $11     
         13        ASSIGN_DIM                                               !1, !2
         14        OP_DATA                                                  $11
    6    15        PRE_INC                                                  !2
         16    >   INIT_FCALL                                               'date'
         17        SEND_VAL                                                 'Y'
         18        DO_ICALL                                         $13     
         19        IS_SMALLER_OR_EQUAL                                      !2, $13
         20      > JMPNZ                                                    ~14, ->4
   11    21    >   INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.43 ms | 1001 KiB | 15 Q