3v4l.org

run code in 500+ PHP versions simultaneously
<?php function getMonthLibelleByDates($filtre) { $format1 = []; $format2 = []; $date = new DateTime(); for ($i = 1; $i <= 12; $i++) { $format1[] = $date->format("M-Y"); $format2[] = $date->format("Y-m-d"); $date->modify("-1 month"); } return array( 'format1'=> $format1, 'format2' => $format2 ); } var_dump(getMonthLibelleByDates(""));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mj2p9
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                                   'var_dump'
          1        INIT_FCALL                                                   'getmonthlibellebydates'
          2        SEND_VAL                                                     ''
          3        DO_FCALL                                          0  $0      
          4        SEND_VAR                                                     $0
          5        DO_ICALL                                                     
          6      > RETURN                                                       1

Function getmonthlibellebydates:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 8
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 8
Branch analysis from position: 24
Branch analysis from position: 8
filename:       /in/Mj2p9
function name:  getMonthLibelleByDates
number of ops:  28
compiled vars:  !0 = $filtre, !1 = $format1, !2 = $format2, !3 = $date, !4 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        ASSIGN                                                       !1, <array>
    5     2        ASSIGN                                                       !2, <array>
    6     3        NEW                                                  $7      'DateTime'
          4        DO_FCALL                                          0          
          5        ASSIGN                                                       !3, $7
    8     6        ASSIGN                                                       !4, 1
          7      > JMP                                                          ->22
    9     8    >   INIT_METHOD_CALL                                             !3, 'format'
          9        SEND_VAL_EX                                                  'M-Y'
         10        DO_FCALL                                          0  $12     
         11        ASSIGN_DIM                                                   !1
         12        OP_DATA                                                      $12
   10    13        INIT_METHOD_CALL                                             !3, 'format'
         14        SEND_VAL_EX                                                  'Y-m-d'
         15        DO_FCALL                                          0  $14     
         16        ASSIGN_DIM                                                   !2
         17        OP_DATA                                                      $14
   11    18        INIT_METHOD_CALL                                             !3, 'modify'
         19        SEND_VAL_EX                                                  '-1+month'
         20        DO_FCALL                                          0          
    8    21        PRE_INC                                                      !4
         22    >   IS_SMALLER_OR_EQUAL                                          !4, 12
         23      > JMPNZ                                                        ~17, ->8
   15    24    >   INIT_ARRAY                                           ~18     !1, 'format1'
   16    25        ADD_ARRAY_ELEMENT                                    ~18     !2, 'format2'
         26      > RETURN                                                       ~18
   18    27*     > RETURN                                                       null

End of function getmonthlibellebydates

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.28 ms | 2337 KiB | 15 Q