3v4l.org

run code in 300+ PHP versions simultaneously
<?php $to_date = time("2014-01-02"); // Input your date here e.g. strtotime("2014-01-02") $from_date = strtotime("2012-01-31"); $day_diff = $to_date - $from_date; echo floor($day_diff/(60*60*24)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mcss2
function name:  (null)
number of ops:  16
compiled vars:  !0 = $to_date, !1 = $from_date, !2 = $day_diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'time'
          1        SEND_VAL                                                 '2014-01-02'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    3     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '2012-01-31'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    4     8        SUB                                              ~7      !0, !1
          9        ASSIGN                                                   !2, ~7
    5    10        INIT_FCALL                                               'floor'
         11        DIV                                              ~9      !2, 86400
         12        SEND_VAL                                                 ~9
         13        DO_ICALL                                         $10     
         14        ECHO                                                     $10
    6    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.32 ms | 1394 KiB | 19 Q