3v4l.org

run code in 300+ PHP versions simultaneously
<?php $to_time = new \DateTime('2008-12-13 18:42:00'); $from_time = new \DateTime('2008-12-13 18:41:58'); $diff = $from_time->diff($to_time); echo $diff->format('%i Minutes %s Seconds');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gALWD
function name:  (null)
number of ops:  17
compiled vars:  !0 = $to_time, !1 = $from_time, !2 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '2008-12-13+18%3A42%3A00'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    3     4        NEW                                              $6      'DateTime'
          5        SEND_VAL_EX                                              '2008-12-13+18%3A41%3A58'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    4     8        INIT_METHOD_CALL                                         !1, 'diff'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $9      
         11        ASSIGN                                                   !2, $9
    5    12        INIT_METHOD_CALL                                         !2, 'format'
         13        SEND_VAL_EX                                              '%25i+Minutes+%25s+Seconds'
         14        DO_FCALL                                      0  $11     
         15        ECHO                                                     $11
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.25 ms | 1393 KiB | 13 Q