3v4l.org

run code in 300+ PHP versions simultaneously
<?php // indicate the start date here $startdate = '2014-14-01'; // indicate the end date here $enddate = '2014-14-09'; $timestamp_start = strtotime($startdate); $timestamp_end = strtotime($enddate); $difference = abs($timestamp_end - $timestamp_start); // that's it! echo 'Seconds: '.$difference/86400;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YDmib
function name:  (null)
number of ops:  19
compiled vars:  !0 = $startdate, !1 = $enddate, !2 = $timestamp_start, !3 = $timestamp_end, !4 = $difference
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '2014-14-01'
    7     1        ASSIGN                                                   !1, '2014-14-09'
    9     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !2, $7
   11     6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $9      
          9        ASSIGN                                                   !3, $9
   13    10        INIT_FCALL                                               'abs'
         11        SUB                                              ~11     !3, !2
         12        SEND_VAL                                                 ~11
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !4, $12
   15    15        DIV                                              ~14     !4, 86400
         16        CONCAT                                           ~15     'Seconds%3A+', ~14
         17        ECHO                                                     ~15
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.38 ms | 1395 KiB | 17 Q