3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime('yesterday'); $future_date = new DateTime('2017-07-17 8:00:00'); $interval = $future_date->diff($yesterday); echo $interval->format("%a days, %h hours, %i minutes, %s seconds");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ctbet
function name:  (null)
number of ops:  17
compiled vars:  !0 = $now, !1 = $future_date, !2 = $interval, !3 = $yesterday
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DateTime'
          1        SEND_VAL_EX                                              'yesterday'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    3     4        NEW                                              $7      'DateTime'
          5        SEND_VAL_EX                                              '2017-07-17+8%3A00%3A00'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
    6     8        INIT_METHOD_CALL                                         !1, 'diff'
          9        SEND_VAR_EX                                              !3
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !2, $10
    8    12        INIT_METHOD_CALL                                         !2, 'format'
         13        SEND_VAL_EX                                              '%25a+days%2C+%25h+hours%2C+%25i+minutes%2C+%25s+seconds'
         14        DO_FCALL                                      0  $12     
         15        ECHO                                                     $12
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.21 ms | 1397 KiB | 13 Q