3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data['PremiumStartTime'] = '2018-12-12 21:13:00'; $data['PremiumDays'] = 20; $days_remaining = $data['PremiumDays'] - date_create($data['PremiumStartTime'])->diff(date_create())->days; echo number_format($days_remaining);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iVbuP
function name:  (null)
number of ops:  22
compiled vars:  !0 = $data, !1 = $days_remaining
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                                   !0, 'PremiumStartTime'
          1        OP_DATA                                                      '2018-12-12+21%3A13%3A00'
    3     2        ASSIGN_DIM                                                   !0, 'PremiumDays'
          3        OP_DATA                                                      20
    4     4        FETCH_DIM_R                                          ~4      !0, 'PremiumDays'
          5        INIT_FCALL                                                   'date_create'
          6        FETCH_DIM_R                                          ~5      !0, 'PremiumStartTime'
          7        SEND_VAL                                                     ~5
          8        DO_ICALL                                             $6      
          9        INIT_METHOD_CALL                                             $6, 'diff'
         10        INIT_FCALL                                                   'date_create'
         11        DO_ICALL                                             $7      
         12        SEND_VAR_NO_REF_EX                                           $7
         13        DO_FCALL                                          0  $8      
         14        FETCH_OBJ_R                                          ~9      $8, 'days'
         15        SUB                                                  ~10     ~4, ~9
         16        ASSIGN                                                       !1, ~10
    5    17        INIT_FCALL                                                   'number_format'
         18        SEND_VAR                                                     !1
         19        DO_ICALL                                             $12     
         20        ECHO                                                         $12
         21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.7 ms | 2516 KiB | 15 Q