3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_fastbonus($reg_date){ $reg_date = $reg_date->format('Y-m-d'); $expire = date('Y-m-d', strtotime($reg_date.' + 60 days')); $diff = strtotime($expire) - strtotime(date('Y-m-d')); $daysleft = floor( $diff / (60 * 60 * 24) ); if($daysleft > 0) return $daysleft; else return FALSE; } echo is_fastbonus('2014-04-01');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vlrNb
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'is_fastbonus'
          1        SEND_VAL                                                 '2014-04-01'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function is_fastbonus:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vlrNb
function name:  is_fastbonus
number of ops:  36
compiled vars:  !0 = $reg_date, !1 = $expire, !2 = $diff, !3 = $daysleft
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_METHOD_CALL                                         !0, 'format'
          2        SEND_VAL_EX                                              'Y-m-d'
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !0, $4
    5     5        INIT_FCALL                                               'date'
          6        SEND_VAL                                                 'Y-m-d'
          7        INIT_FCALL                                               'strtotime'
          8        CONCAT                                           ~6      !0, '+%2B+60+days'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                         $7      
         11        SEND_VAR                                                 $7
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !1, $8
    6    14        INIT_FCALL                                               'strtotime'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $10     
         17        INIT_FCALL                                               'strtotime'
         18        INIT_FCALL                                               'date'
         19        SEND_VAL                                                 'Y-m-d'
         20        DO_ICALL                                         $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                         $12     
         23        SUB                                              ~13     $10, $12
         24        ASSIGN                                                   !2, ~13
    7    25        INIT_FCALL                                               'floor'
         26        DIV                                              ~15     !2, 86400
         27        SEND_VAL                                                 ~15
         28        DO_ICALL                                         $16     
         29        ASSIGN                                                   !3, $16
    8    30        IS_SMALLER                                               0, !3
         31      > JMPZ                                                     ~18, ->34
    9    32    > > RETURN                                                   !3
         33*       JMP                                                      ->35
   11    34    > > RETURN                                                   <false>
   12    35*     > RETURN                                                   null

End of function is_fastbonus

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.45 ms | 1394 KiB | 20 Q