3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(LC_ALL, 'UTF-8'); date_default_timezone_set('America/Sao_Paulo'); $datestring = ''; $monthago = ''; $monthsago = ''; $period = new DatePeriod( new DateTime('-3 months'), DateInterval::createFromDateString('first day of next month'), new DateTime('NOW') ); $months = array(); foreach ($period as $p) $months[] = strftime('%B', $p->getTimestamp()); $months = str_replace("January","Janeiro",$months); $months = str_replace("February","Fevereiro",$months); $months = str_replace("March","Março",$months); $months = str_replace("April","Abril",$months); $months = str_replace("May","Maio",$months); $months = str_replace("June","Junho",$months); $months = str_replace("July","Julho",$months); $months = str_replace("September","Setembro",$months); $months = str_replace("October","Outubro",$months); $months = str_replace("November","Novembro",$months); $months = str_replace("December","Dezembro",$months); print_r($months[1]) ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 37
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 37
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/JWorP
function name:  (null)
number of ops:  109
compiled vars:  !0 = $datestring, !1 = $monthago, !2 = $monthsago, !3 = $period, !4 = $months, !5 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'setlocale'
          1        SEND_VAL                                                 6
          2        SEND_VAL                                                 'UTF-8'
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'date_default_timezone_set'
          5        SEND_VAL                                                 'America%2FSao_Paulo'
          6        DO_ICALL                                                 
    7     7        ASSIGN                                                   !0, ''
    8     8        ASSIGN                                                   !1, ''
    9     9        ASSIGN                                                   !2, ''
   10    10        NEW                                              $11     'DatePeriod'
   11    11        NEW                                              $12     'DateTime'
         12        SEND_VAL_EX                                              '-3+months'
         13        DO_FCALL                                      0          
         14        SEND_VAR_NO_REF_EX                                       $12
   12    15        INIT_STATIC_METHOD_CALL                                  'DateInterval', 'createFromDateString'
         16        SEND_VAL                                                 'first+day+of+next+month'
         17        DO_FCALL                                      0  $14     
         18        SEND_VAR_NO_REF_EX                                       $14
   13    19        NEW                                              $15     'DateTime'
         20        SEND_VAL_EX                                              'NOW'
         21        DO_FCALL                                      0          
         22        SEND_VAR_NO_REF_EX                                       $15
         23        DO_FCALL                                      0          
   10    24        ASSIGN                                                   !3, $11
   16    25        ASSIGN                                                   !4, <array>
   18    26      > FE_RESET_R                                       $20     !3, ->37
         27    > > FE_FETCH_R                                               $20, !5, ->37
   19    28    >   INIT_FCALL                                               'strftime'
         29        SEND_VAL                                                 '%25B'
         30        INIT_METHOD_CALL                                         !5, 'getTimestamp'
         31        DO_FCALL                                      0  $22     
         32        SEND_VAR                                                 $22
         33        DO_ICALL                                         $23     
         34        ASSIGN_DIM                                               !4
         35        OP_DATA                                                  $23
   18    36      > JMP                                                      ->27
         37    >   FE_FREE                                                  $20
   22    38        INIT_FCALL                                               'str_replace'
         39        SEND_VAL                                                 'January'
         40        SEND_VAL                                                 'Janeiro'
         41        SEND_VAR                                                 !4
         42        DO_ICALL                                         $24     
         43        ASSIGN                                                   !4, $24
   23    44        INIT_FCALL                                               'str_replace'
         45        SEND_VAL                                                 'February'
         46        SEND_VAL                                                 'Fevereiro'
         47        SEND_VAR                                                 !4
         48        DO_ICALL                                         $26     
         49        ASSIGN                                                   !4, $26
   24    50        INIT_FCALL                                               'str_replace'
         51        SEND_VAL                                                 'March'
         52        SEND_VAL                                                 'Mar%C3%A7o'
         53        SEND_VAR                                                 !4
         54        DO_ICALL                                         $28     
         55        ASSIGN                                                   !4, $28
   25    56        INIT_FCALL                                               'str_replace'
         57        SEND_VAL                                                 'April'
         58        SEND_VAL                                                 'Abril'
         59        SEND_VAR                                                 !4
         60        DO_ICALL                                         $30     
         61        ASSIGN                                                   !4, $30
   26    62        INIT_FCALL                                               'str_replace'
         63        SEND_VAL                                                 'May'
         64        SEND_VAL                                                 'Maio'
         65        SEND_VAR                                                 !4
         66        DO_ICALL                                         $32     
         67        ASSIGN                                                   !4, $32
   27    68        INIT_FCALL                                               'str_replace'
         69        SEND_VAL                                                 'June'
         70        SEND_VAL                                                 'Junho'
         71        SEND_VAR                                                 !4
         72        DO_ICALL                                         $34     
         73        ASSIGN                                                   !4, $34
   28    74        INIT_FCALL                                               'str_replace'
         75        SEND_VAL                                                 'July'
         76        SEND_VAL                                                 'Julho'
         77        SEND_VAR                                                 !4
         78        DO_ICALL                                         $36     
         79        ASSIGN                                                   !4, $36
   29    80        INIT_FCALL                                               'str_replace'
         81        SEND_VAL                                                 'September'
         82        SEND_VAL                                                 'Setembro'
         83        SEND_VAR                                                 !4
         84        DO_ICALL                                         $38     
         85        ASSIGN                                                   !4, $38
   30    86        INIT_FCALL                                               'str_replace'
         87        SEND_VAL                                                 'October'
         88        SEND_VAL                                                 'Outubro'
         89        SEND_VAR                                                 !4
         90        DO_ICALL                                         $40     
         91        ASSIGN                                                   !4, $40
   31    92        INIT_FCALL                                               'str_replace'
         93        SEND_VAL                                                 'November'
         94        SEND_VAL                                                 'Novembro'
         95        SEND_VAR                                                 !4
         96        DO_ICALL                                         $42     
         97        ASSIGN                                                   !4, $42
   32    98        INIT_FCALL                                               'str_replace'
         99        SEND_VAL                                                 'December'
        100        SEND_VAL                                                 'Dezembro'
        101        SEND_VAR                                                 !4
        102        DO_ICALL                                         $44     
        103        ASSIGN                                                   !4, $44
   36   104        INIT_FCALL                                               'print_r'
        105        FETCH_DIM_R                                      ~46     !4, 1
        106        SEND_VAL                                                 ~46
        107        DO_ICALL                                                 
   38   108      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.28 ms | 1396 KiB | 23 Q