3v4l.org

run code in 300+ PHP versions simultaneously
<?php $quarterMonth = floor(0 / 3) * 3; $quarterYear = date('Y'); if ($quarterMonth == 0) { $quarterMonth = 12; $quarterYear -= 1; } var_dump(new \DateTime(implode('-', array($quarterYear, $quarterMonth, cal_days_in_month(CAL_GREGORIAN, $quarterMonth, $quarterYear)))));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/IbNsd
function name:  (null)
number of ops:  33
compiled vars:  !0 = $quarterMonth, !1 = $quarterYear
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'floor'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                         $2      
          3        MUL                                              ~3      $2, 3
          4        ASSIGN                                                   !0, ~3
    4     5        INIT_FCALL                                               'date'
          6        SEND_VAL                                                 'Y'
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    5     9        IS_EQUAL                                                 !0, 0
         10      > JMPZ                                                     ~7, ->13
    6    11    >   ASSIGN                                                   !0, 12
    7    12        ASSIGN_OP                                     2          !1, 1
   10    13    >   INIT_FCALL                                               'var_dump'
         14        NEW                                              $10     'DateTime'
         15        INIT_FCALL                                               'implode'
         16        SEND_VAL                                                 '-'
         17        INIT_ARRAY                                       ~11     !1
         18        ADD_ARRAY_ELEMENT                                ~11     !0
         19        INIT_FCALL_BY_NAME                                       'cal_days_in_month'
         20        FETCH_CONSTANT                                   ~12     'CAL_GREGORIAN'
         21        SEND_VAL_EX                                              ~12
         22        SEND_VAR_EX                                              !0
         23        SEND_VAR_EX                                              !1
         24        DO_FCALL                                      0  $13     
         25        ADD_ARRAY_ELEMENT                                ~11     $13
         26        SEND_VAL                                                 ~11
         27        DO_ICALL                                         $14     
         28        SEND_VAR_NO_REF_EX                                       $14
         29        DO_FCALL                                      0          
         30        SEND_VAR                                                 $10
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.79 ms | 1396 KiB | 21 Q