3v4l.org

run code in 500+ PHP versions simultaneously
<?php $query['duedate'] = '2019-02-25 08:33:45'; $query['duedate'] = '2019-02-25 08:41:52'; $query['duedate'] = '2019-02-25 09:04:43'; $dbDate = strtotime(date('Y-m-d H:i:s')); // Database date $endDate = strtotime("".$query['duedate'].""); // current time $diff = $endDate - $dbDate; /// diffrence $days = intval(intval($diff) / (3600*24)); $newDays = $days < 0 ? 'EXPIRED' : $days; echo "$days\n$newDays\n";
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 = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pl096
function name:  (null)
number of ops:  38
compiled vars:  !0 = $query, !1 = $dbDate, !2 = $endDate, !3 = $diff, !4 = $days, !5 = $newDays
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                               !0, 'duedate'
          1        OP_DATA                                                  '2019-02-25+08%3A33%3A45'
    3     2        ASSIGN_DIM                                               !0, 'duedate'
          3        OP_DATA                                                  '2019-02-25+08%3A41%3A52'
    4     4        ASSIGN_DIM                                               !0, 'duedate'
          5        OP_DATA                                                  '2019-02-25+09%3A04%3A43'
    5     6        INIT_FCALL                                               'strtotime'
          7        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          9        DO_ICALL                                         $9      
         10        SEND_VAR                                                 $9
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !1, $10
    6    13        INIT_FCALL                                               'strtotime'
         14        FETCH_DIM_R                                      ~12     !0, 'duedate'
         15        CONCAT                                           ~13     '', ~12
         16        CONCAT                                           ~14     ~13, ''
         17        SEND_VAL                                                 ~14
         18        DO_ICALL                                         $15     
         19        ASSIGN                                                   !2, $15
    7    20        SUB                                              ~17     !2, !1
         21        ASSIGN                                                   !3, ~17
    8    22        CAST                                          4  ~19     !3
         23        DIV                                              ~20     ~19, 86400
         24        CAST                                          4  ~21     ~20
         25        ASSIGN                                                   !4, ~21
    9    26        IS_SMALLER                                               !4, 0
         27      > JMPZ                                                     ~23, ->30
         28    >   QM_ASSIGN                                        ~24     'EXPIRED'
         29      > JMP                                                      ->31
         30    >   QM_ASSIGN                                        ~24     !4
         31    >   ASSIGN                                                   !5, ~24
   10    32        ROPE_INIT                                     4  ~27     !4
         33        ROPE_ADD                                      1  ~27     ~27, '%0A'
         34        ROPE_ADD                                      2  ~27     ~27, !5
         35        ROPE_END                                      3  ~26     ~27, '%0A'
         36        ECHO                                                     ~26
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.55 ms | 1989 KiB | 15 Q