3v4l.org

run code in 300+ PHP versions simultaneously
<?php $spd = (60 * 60 * 24); $sph = (60 * 60); $spm = (60); $start = date('Y-m-d H:m:s'); $end = date('Y-m-d H:m:s', strtotime($start . ' +24 hours')); $sec_diff = strtotime($end) - strtotime($start); $days = $sec_diff / $spd; $hours = ($sec_diff - ($days * $spd)) / $sph; echo $days . " " . $hours; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VAAiP
function name:  (null)
number of ops:  34
compiled vars:  !0 = $spd, !1 = $sph, !2 = $spm, !3 = $start, !4 = $end, !5 = $sec_diff, !6 = $days, !7 = $hours
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 86400
    4     1        ASSIGN                                                   !1, 3600
    5     2        ASSIGN                                                   !2, 60
    7     3        INIT_FCALL                                               'date'
          4        SEND_VAL                                                 'Y-m-d+H%3Am%3As'
          5        DO_ICALL                                         $11     
          6        ASSIGN                                                   !3, $11
    8     7        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'Y-m-d+H%3Am%3As'
          9        INIT_FCALL                                               'strtotime'
         10        CONCAT                                           ~13     !3, '+%2B24+hours'
         11        SEND_VAL                                                 ~13
         12        DO_ICALL                                         $14     
         13        SEND_VAR                                                 $14
         14        DO_ICALL                                         $15     
         15        ASSIGN                                                   !4, $15
   10    16        INIT_FCALL                                               'strtotime'
         17        SEND_VAR                                                 !4
         18        DO_ICALL                                         $17     
         19        INIT_FCALL                                               'strtotime'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                         $18     
         22        SUB                                              ~19     $17, $18
         23        ASSIGN                                                   !5, ~19
   12    24        DIV                                              ~21     !5, !0
         25        ASSIGN                                                   !6, ~21
   13    26        MUL                                              ~23     !6, !0
         27        SUB                                              ~24     !5, ~23
         28        DIV                                              ~25     ~24, !1
         29        ASSIGN                                                   !7, ~25
   15    30        CONCAT                                           ~27     !6, '+'
         31        CONCAT                                           ~28     ~27, !7
         32        ECHO                                                     ~28
   18    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.99 ms | 1388 KiB | 17 Q