3v4l.org

run code in 300+ PHP versions simultaneously
<?php $day_start="06:00"; $day_end="22:59"; $night_start="23:00"; $night_end="05:59"; $dtarif="30USD"; $ntarif="80USD"; showtarif($day_start,$day_end,$night_start,$night_end,$dtarif,$ntarif); function showtarif($day_start,$day_end,$night_start,$night_end,$dtarif,$ntarif) { $current=date("H:i"); if ($current >=$day_start && $current <=$day_end) { $absulate_tarif=$dtarif; } else if ($current >=$night_start && $current <=$night_end) { $absulate_tarif=$ntarif; } echo $absulate_tarif; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f5fc0
function name:  (null)
number of ops:  15
compiled vars:  !0 = $day_start, !1 = $day_end, !2 = $night_start, !3 = $night_end, !4 = $dtarif, !5 = $ntarif
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '06%3A00'
    3     1        ASSIGN                                                   !1, '22%3A59'
    5     2        ASSIGN                                                   !2, '23%3A00'
    6     3        ASSIGN                                                   !3, '05%3A59'
    8     4        ASSIGN                                                   !4, '30USD'
    9     5        ASSIGN                                                   !5, '80USD'
   11     6        INIT_FCALL_BY_NAME                                       'showtarif'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !1
          9        SEND_VAR_EX                                              !2
         10        SEND_VAR_EX                                              !3
         11        SEND_VAR_EX                                              !4
         12        SEND_VAR_EX                                              !5
         13        DO_FCALL                                      0          
   29    14      > RETURN                                                   1

Function showtarif:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 21
Branch analysis from position: 14
filename:       /in/f5fc0
function name:  showtarif
number of ops:  25
compiled vars:  !0 = $day_start, !1 = $day_end, !2 = $night_start, !3 = $night_end, !4 = $dtarif, !5 = $ntarif, !6 = $current, !7 = $absulate_tarif
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
          5        RECV                                             !5      
   17     6        INIT_FCALL                                               'date'
          7        SEND_VAL                                                 'H%3Ai'
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !6, $8
   19    10        IS_SMALLER_OR_EQUAL                              ~10     !0, !6
         11      > JMPZ_EX                                          ~10     ~10, ->14
         12    >   IS_SMALLER_OR_EQUAL                              ~11     !6, !1
         13        BOOL                                             ~10     ~11
         14    > > JMPZ                                                     ~10, ->17
   21    15    >   ASSIGN                                                   !7, !4
         16      > JMP                                                      ->23
   24    17    >   IS_SMALLER_OR_EQUAL                              ~13     !2, !6
         18      > JMPZ_EX                                          ~13     ~13, ->21
         19    >   IS_SMALLER_OR_EQUAL                              ~14     !6, !3
         20        BOOL                                             ~13     ~14
         21    > > JMPZ                                                     ~13, ->23
   25    22    >   ASSIGN                                                   !7, !5
   28    23    >   ECHO                                                     !7
   29    24      > RETURN                                                   null

End of function showtarif

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
215.16 ms | 1400 KiB | 15 Q