3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/London'); $date = new DateTime(); $A = $date->format('Y-m-d H:i:s'); $date->modify("+64 minutes"); $B = $date->format('Y-m-d H:i:s'); var_dump($B - $A); echo date('h:i', strtotime($B) - strtotime($A));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FYkXK
function name:  (null)
number of ops:  34
compiled vars:  !0 = $date, !1 = $A, !2 = $B
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'Europe%2FLondon'
          2        DO_ICALL                                                 
    3     3        NEW                                              $4      'DateTime'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $4
    4     6        INIT_METHOD_CALL                                         !0, 'format'
          7        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
          8        DO_FCALL                                      0  $7      
          9        ASSIGN                                                   !1, $7
    5    10        INIT_METHOD_CALL                                         !0, 'modify'
         11        SEND_VAL_EX                                              '%2B64+minutes'
         12        DO_FCALL                                      0          
    6    13        INIT_METHOD_CALL                                         !0, 'format'
         14        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         15        DO_FCALL                                      0  $10     
         16        ASSIGN                                                   !2, $10
    7    17        INIT_FCALL                                               'var_dump'
         18        SUB                                              ~12     !2, !1
         19        SEND_VAL                                                 ~12
         20        DO_ICALL                                                 
    8    21        INIT_FCALL                                               'date'
         22        SEND_VAL                                                 'h%3Ai'
         23        INIT_FCALL                                               'strtotime'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $14     
         26        INIT_FCALL                                               'strtotime'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $15     
         29        SUB                                              ~16     $14, $15
         30        SEND_VAL                                                 ~16
         31        DO_ICALL                                         $17     
         32        ECHO                                                     $17
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.24 ms | 1396 KiB | 21 Q