3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_expired($reg_data){ $expira = date('Y-m-d', strtotime($reg_data.' + 182 days')); $diff = strtotime($expira) - strtotime(date('Y-m-d')); $daysleft=floor($diff/(60*60*24)); if($daysleft > 0) return $daysleft; else return FALSE; } var_dump(is_expired('2013-04-01')); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o3jLe
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'is_expired'
          2        SEND_VAL                                                 '2013-04-01'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   13     6      > RETURN                                                   1

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

End of function is_expired

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.16 ms | 1403 KiB | 22 Q