3v4l.org

run code in 500+ PHP versions simultaneously
<?php $start = new \DateTime('1st January'); $end = new \DateTime('31st December'); $interval = new \DateInterval('P1D'); $period = new \DatePeriod($start, $interval, $end->modify('+ 1 day')); $year = array(); foreach($period as $day){ $year[$day->format('M')][(int)$day->format('d')] = $day->format('D'); } var_dump($year);

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 38
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 38
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/UYTND
function name:  (null)
number of ops:  43
compiled vars:  !0 = $start, !1 = $end, !2 = $interval, !3 = $period, !4 = $year, !5 = $day
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   NEW                                                  $6      'DateTime'
          1        SEND_VAL_EX                                                  '1st+January'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $6
    3     4        NEW                                                  $9      'DateTime'
          5        SEND_VAL_EX                                                  '31st+December'
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $9
    4     8        NEW                                                  $12     'DateInterval'
          9        SEND_VAL_EX                                                  'P1D'
         10        DO_FCALL                                          0          
         11        ASSIGN                                                       !2, $12
    5    12        NEW                                                  $15     'DatePeriod'
         13        SEND_VAR_EX                                                  !0
         14        SEND_VAR_EX                                                  !2
         15        INIT_METHOD_CALL                                             !1, 'modify'
         16        SEND_VAL_EX                                                  '%2B+1+day'
         17        DO_FCALL                                          0  $16     
         18        SEND_VAR_NO_REF_EX                                           $16
         19        DO_FCALL                                          0          
         20        ASSIGN                                                       !3, $15
    7    21        ASSIGN                                                       !4, <array>
    9    22      > FE_RESET_R                                           $20     !3, ->38
         23    > > FE_FETCH_R                                                   $20, !5, ->38
   10    24    >   INIT_METHOD_CALL                                             !5, 'format'
         25        SEND_VAL_EX                                                  'M'
         26        DO_FCALL                                          0  $21     
         27        INIT_METHOD_CALL                                             !5, 'format'
         28        SEND_VAL_EX                                                  'd'
         29        DO_FCALL                                          0  $23     
         30        CAST                                              4  ~24     $23
         31        INIT_METHOD_CALL                                             !5, 'format'
         32        SEND_VAL_EX                                                  'D'
         33        DO_FCALL                                          0  $26     
         34        FETCH_DIM_W                                          $22     !4, $21
         35        ASSIGN_DIM                                                   $22, ~24
         36        OP_DATA                                                      $26
    9    37      > JMP                                                          ->23
         38    >   FE_FREE                                                      $20
   13    39        INIT_FCALL                                                   'var_dump'
         40        SEND_VAR                                                     !4
         41        DO_ICALL                                                     
         42      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
190.36 ms | 7372 KiB | 14 Q