3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time1 = strtotime('00:00:00 +0000'); $time2 = strtotime('00:00:07 +0000'); $epoch = strtotime('01 Jan 1970'); $diff = $time2 - $time1; var_dump($time1,$time2,$epoch,$diff); $diff = date('H:i:s', $epoch+$diff); echo $diff;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uK2NU
function name:  (null)
number of ops:  28
compiled vars:  !0 = $time1, !1 = $time2, !2 = $epoch, !3 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '00%3A00%3A00+%2B0000'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    4     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '00%3A00%3A07+%2B0000'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
    5     8        INIT_FCALL                                               'strtotime'
          9        SEND_VAL                                                 '01+Jan+1970'
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !2, $8
    6    12        SUB                                              ~10     !1, !0
         13        ASSIGN                                                   !3, ~10
    7    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !1
         17        SEND_VAR                                                 !2
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
    8    20        INIT_FCALL                                               'date'
         21        SEND_VAL                                                 'H%3Ai%3As'
         22        ADD                                              ~13     !2, !3
         23        SEND_VAL                                                 ~13
         24        DO_ICALL                                         $14     
         25        ASSIGN                                                   !3, $14
    9    26        ECHO                                                     !3
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.23 ms | 1004 KiB | 16 Q