3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pmGetTaxRate($date = false) { if(!$date){ $date = time(); } if(!is_numeric($date)){ $date = strtotime($date); } if($date >= strtotime('2020-07-01') && $date < strtotime('2021-01-01')){ return 16; } return 19; } var_dump(pmGetTaxRate('2020-07-01'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UMTZ1
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'pmgettaxrate'
          2        SEND_VAL                                                 '2020-07-01'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function pmgettaxrate:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 15
Branch analysis from position: 6
filename:       /in/UMTZ1
function name:  pmGetTaxRate
number of ops:  29
compiled vars:  !0 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      <false>
    6     1        BOOL_NOT                                         ~1      !0
          2      > JMPZ                                                     ~1, ->6
    7     3    >   INIT_FCALL                                               'time'
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
   10     6    >   INIT_FCALL                                               'is_numeric'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        BOOL_NOT                                         ~5      $4
         10      > JMPZ                                                     ~5, ->15
   11    11    >   INIT_FCALL                                               'strtotime'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        ASSIGN                                                   !0, $6
   14    15    >   INIT_FCALL                                               'strtotime'
         16        SEND_VAL                                                 '2020-07-01'
         17        DO_ICALL                                         $8      
         18        IS_SMALLER_OR_EQUAL                              ~9      $8, !0
         19      > JMPZ_EX                                          ~9      ~9, ->25
         20    >   INIT_FCALL                                               'strtotime'
         21        SEND_VAL                                                 '2021-01-01'
         22        DO_ICALL                                         $10     
         23        IS_SMALLER                                       ~11     !0, $10
         24        BOOL                                             ~9      ~11
         25    > > JMPZ                                                     ~9, ->27
   15    26    > > RETURN                                                   16
   18    27    > > RETURN                                                   19
   19    28*     > RETURN                                                   null

End of function pmgettaxrate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.2 ms | 1403 KiB | 22 Q