3v4l.org

run code in 300+ PHP versions simultaneously
<?php $endTime = new DateTime('tomorrow'); date_default_timezone_set('America/New_York'); $now = new DateTime(); if($endTime > $now){ $interval = $endTime->diff($now); echo $interval->format("%h:%i:%s"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/JAnOo
function name:  (null)
number of ops:  21
compiled vars:  !0 = $endTime, !1 = $now, !2 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              'tomorrow'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        INIT_FCALL                                               'date_default_timezone_set'
          5        SEND_VAL                                                 'America%2FNew_York'
          6        DO_ICALL                                                 
    6     7        NEW                                              $7      'DateTime'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
    7    10        IS_SMALLER                                               !1, !0
         11      > JMPZ                                                     ~10, ->20
    8    12    >   INIT_METHOD_CALL                                         !0, 'diff'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0  $11     
         15        ASSIGN                                                   !2, $11
    9    16        INIT_METHOD_CALL                                         !2, 'format'
         17        SEND_VAL_EX                                              '%25h%3A%25i%3A%25s'
         18        DO_FCALL                                      0  $13     
         19        ECHO                                                     $13
   10    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.23 ms | 1395 KiB | 15 Q