3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startTimeStamp = strtotime("1971/01/01"); $endTimeStamp = date("d/m/Y"); $timeDiff = abs($endTimeStamp - $startTimeStamp); $numberDays = $timeDiff/86400; // 86400 seconds in one day // and you might want to convert to integer echo $numberDays = intval($numberDays); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZcGt2
function name:  (null)
number of ops:  19
compiled vars:  !0 = $startTimeStamp, !1 = $endTimeStamp, !2 = $timeDiff, !3 = $numberDays
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '1971%2F01%2F01'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    4     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'd%2Fm%2FY'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
    6     8        INIT_FCALL                                               'abs'
          9        SUB                                              ~8      !1, !0
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
    8    13        DIV                                              ~11     !2, 86400
         14        ASSIGN                                                   !3, ~11
   11    15        CAST                                          4  ~13     !3
         16        ASSIGN                                           ~14     !3, ~13
         17        ECHO                                                     ~14
   13    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.28 ms | 1394 KiB | 19 Q