3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startTimeStamp = strtotime("1971/01/01"); $endTimeStamp = date("Y/m/d"); echo $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/FumPS
function name:  (null)
number of ops:  20
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                                                 'Y%2Fm%2Fd'
          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                                           ~10     !2, $9
         13        ECHO                                                     ~10
    8    14        DIV                                              ~11     !2, 86400
         15        ASSIGN                                                   !3, ~11
   11    16        CAST                                          4  ~13     !3
         17        ASSIGN                                           ~14     !3, ~13
         18        ECHO                                                     ~14
   13    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.06 ms | 1395 KiB | 19 Q