3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datetime1 = strtotime("2017-03-31"); $datetime2 = strtotime(date('Y-m-d')); $secs = $datetime1 - $datetime2;// == <seconds between the two times> $days = $secs / 86400; echo $days;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/48LZa
function name:  (null)
number of ops:  17
compiled vars:  !0 = $datetime1, !1 = $datetime2, !2 = $secs, !3 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '2017-03-31'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    4     4        INIT_FCALL                                               'strtotime'
          5        INIT_FCALL                                               'date'
          6        SEND_VAL                                                 'Y-m-d'
          7        DO_ICALL                                         $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !1, $7
    5    11        SUB                                              ~9      !0, !1
         12        ASSIGN                                                   !2, ~9
    6    13        DIV                                              ~11     !2, 86400
         14        ASSIGN                                                   !3, ~11
    7    15        ECHO                                                     !3
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.2 ms | 1399 KiB | 17 Q