3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set( 'America/Sao_Paulo' ); $mes = 07; $ano = 2014; $dias = cal_days_in_month(CAL_GREGORIAN, $mes, $ano); $ultimo = mktime(0, 0, 0, $mes, $dias, $ano); $dia = date("j", $ultimo); $dia_semana = date("w", $ultimo); if($dia_semana == 0){ $dia--; $dia--; } if($dia_semana == 6) $dia--; $ultimo = date("d/m/Y",mktime(0, 0, 0, $mes, $dia, $ano)); $hoje= date("d/m/Y"); if ($ultimo==$hoje) echo "verdadeiro"; else echo "falso";
based on DE1Ov
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 32, Position 2 = 36
Branch analysis from position: 32
Jump found. Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
Jump found. Position 1 = 59, Position 2 = 61
Branch analysis from position: 59
Jump found. Position 1 = 62
Branch analysis from position: 62
Jump found. Position 1 = -2
Branch analysis from position: 61
Jump found. Position 1 = -2
Branch analysis from position: 40
Branch analysis from position: 36
filename:       /in/7499L
function name:  (null)
number of ops:  63
compiled vars:  !0 = $mes, !1 = $ano, !2 = $dias, !3 = $ultimo, !4 = $dia, !5 = $dia_semana, !6 = $hoje
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   INIT_FCALL                                               'date_default_timezone_set'
         1        SEND_VAL                                                 'America%2FSao_Paulo'
         2        DO_ICALL                                                 
   3     3        ASSIGN                                                   !0, 7
   4     4        ASSIGN                                                   !1, 2014
   5     5        INIT_FCALL                                               'cal_days_in_month'
         6        SEND_VAL                                                 0
         7        SEND_VAR                                                 !0
         8        SEND_VAR                                                 !1
         9        DO_ICALL                                         $10     
        10        ASSIGN                                                   !2, $10
   6    11        INIT_FCALL                                               'mktime'
        12        SEND_VAL                                                 0
        13        SEND_VAL                                                 0
        14        SEND_VAL                                                 0
        15        SEND_VAR                                                 !0
        16        SEND_VAR                                                 !2
        17        SEND_VAR                                                 !1
        18        DO_ICALL                                         $12     
        19        ASSIGN                                                   !3, $12
   7    20        INIT_FCALL                                               'date'
        21        SEND_VAL                                                 'j'
        22        SEND_VAR                                                 !3
        23        DO_ICALL                                         $14     
        24        ASSIGN                                                   !4, $14
   8    25        INIT_FCALL                                               'date'
        26        SEND_VAL                                                 'w'
        27        SEND_VAR                                                 !3
        28        DO_ICALL                                         $16     
        29        ASSIGN                                                   !5, $16
   9    30        IS_EQUAL                                         ~18     !5, 0
        31      > JMPZ                                                     ~18, ->36
  10    32    >   POST_DEC                                         ~19     !4
        33        FREE                                                     ~19
  11    34        POST_DEC                                         ~20     !4
        35        FREE                                                     ~20
  13    36    >   IS_EQUAL                                         ~21     !5, 6
        37      > JMPZ                                                     ~21, ->40
  14    38    >   POST_DEC                                         ~22     !4
        39        FREE                                                     ~22
  15    40    >   INIT_FCALL                                               'date'
        41        SEND_VAL                                                 'd%2Fm%2FY'
        42        INIT_FCALL                                               'mktime'
        43        SEND_VAL                                                 0
        44        SEND_VAL                                                 0
        45        SEND_VAL                                                 0
        46        SEND_VAR                                                 !0
        47        SEND_VAR                                                 !4
        48        SEND_VAR                                                 !1
        49        DO_ICALL                                         $23     
        50        SEND_VAR                                                 $23
        51        DO_ICALL                                         $24     
        52        ASSIGN                                                   !3, $24
  16    53        INIT_FCALL                                               'date'
        54        SEND_VAL                                                 'd%2Fm%2FY'
        55        DO_ICALL                                         $26     
        56        ASSIGN                                                   !6, $26
  17    57        IS_EQUAL                                         ~28     !3, !6
        58      > JMPZ                                                     ~28, ->61
  18    59    >   ECHO                                                     'verdadeiro'
        60      > JMP                                                      ->62
  20    61    >   ECHO                                                     'falso'
        62    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0