3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check_hours_soiree($heure) { $soiree_start = 20; $soiree_end = 23; $jour = intval(date("j")); //$heure = intval(date("G")); $mois = intval(date("n")); if(($jour == 24 || $jour == 25 || $jour == 31) && $mois == 12) { $soiree_start = 19; } if($jour == 1 && $mois == 1) { $soiree_start = 19; } return ($heure >= $soiree_start && $heure < $soiree_end); } function check_hours_night($heure) { $night_start = 23; // $heure = $heure = intval(date("G")); return ($heure >= $night_start && heure < 8); } for($i = 0; $i <= 23; $i++) { echo $i." ".check_hours_night($i)."\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
Branch analysis from position: 2
filename:       /in/qaauf
function name:  (null)
number of ops:  13
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->10
   33     2    >   CONCAT                                           ~2      !0, '++'
          3        INIT_FCALL                                               'check_hours_night'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $3      
          6        CONCAT                                           ~4      ~2, $3
          7        CONCAT                                           ~5      ~4, '%0A'
          8        ECHO                                                     ~5
   31     9        PRE_INC                                                  !0
         10    >   IS_SMALLER_OR_EQUAL                                      !0, 23
         11      > JMPNZ                                                    ~7, ->2
   34    12    > > RETURN                                                   1

Function check_hours_soiree:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
2 jumps found. (Code = 47) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
2 jumps found. (Code = 46) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
2 jumps found. (Code = 46) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
2 jumps found. (Code = 46) Position 1 = 33, Position 2 = 35
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
Branch analysis from position: 31
Branch analysis from position: 29
Branch analysis from position: 25
Branch analysis from position: 23
Branch analysis from position: 20
Branch analysis from position: 17
filename:       /in/qaauf
function name:  check_hours_soiree
number of ops:  37
compiled vars:  !0 = $heure, !1 = $soiree_start, !2 = $soiree_end, !3 = $jour, !4 = $mois
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, 20
    5     2        ASSIGN                                                   !2, 23
    6     3        INIT_FCALL                                               'date'
          4        SEND_VAL                                                 'j'
          5        DO_ICALL                                         $7      
          6        CAST                                          4  ~8      $7
          7        ASSIGN                                                   !3, ~8
    8     8        INIT_FCALL                                               'date'
          9        SEND_VAL                                                 'n'
         10        DO_ICALL                                         $10     
         11        CAST                                          4  ~11     $10
         12        ASSIGN                                                   !4, ~11
   11    13        IS_EQUAL                                         ~13     !3, 24
         14      > JMPNZ_EX                                         ~13     ~13, ->17
         15    >   IS_EQUAL                                         ~14     !3, 25
         16        BOOL                                             ~13     ~14
         17    > > JMPNZ_EX                                         ~13     ~13, ->20
         18    >   IS_EQUAL                                         ~15     !3, 31
         19        BOOL                                             ~13     ~15
         20    > > JMPZ_EX                                          ~13     ~13, ->23
         21    >   IS_EQUAL                                         ~16     !4, 12
         22        BOOL                                             ~13     ~16
         23    > > JMPZ                                                     ~13, ->25
   13    24    >   ASSIGN                                                   !1, 19
   15    25    >   IS_EQUAL                                         ~18     !3, 1
         26      > JMPZ_EX                                          ~18     ~18, ->29
         27    >   IS_EQUAL                                         ~19     !4, 1
         28        BOOL                                             ~18     ~19
         29    > > JMPZ                                                     ~18, ->31
   17    30    >   ASSIGN                                                   !1, 19
   19    31    >   IS_SMALLER_OR_EQUAL                              ~21     !1, !0
         32      > JMPZ_EX                                          ~21     ~21, ->35
         33    >   IS_SMALLER                                       ~22     !0, !2
         34        BOOL                                             ~21     ~22
         35    > > RETURN                                                   ~21
   21    36*     > RETURN                                                   null

End of function check_hours_soiree

Function check_hours_night:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/qaauf
function name:  check_hours_night
number of ops:  9
compiled vars:  !0 = $heure, !1 = $night_start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
   25     1        ASSIGN                                                   !1, 23
   28     2        IS_SMALLER_OR_EQUAL                              ~3      !1, !0
          3      > JMPZ_EX                                          ~3      ~3, ->7
          4    >   FETCH_CONSTANT                                   ~4      'heure'
          5        IS_SMALLER                                       ~5      ~4, 8
          6        BOOL                                             ~3      ~5
          7    > > RETURN                                                   ~3
   29     8*     > RETURN                                                   null

End of function check_hours_night

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.96 ms | 1402 KiB | 16 Q