3v4l.org

run code in 300+ PHP versions simultaneously
<?php $expires_at = DateTime::createFromFormat("Y-m-d H:i:s", "2014-08-14 13:22:22"); $now = new DateTime(); $interval = $now->diff($expires_at); echo ( $interval->i );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2R7Vk
function name:  (null)
number of ops:  15
compiled vars:  !0 = $expires_at, !1 = $now, !2 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          1        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          2        SEND_VAL                                                 '2014-08-14+13%3A22%3A22'
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !0, $3
    3     5        NEW                                              $5      'DateTime'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
    4     8        INIT_METHOD_CALL                                         !1, 'diff'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $8      
         11        ASSIGN                                                   !2, $8
    6    12        FETCH_OBJ_R                                      ~10     !2, 'i'
         13        ECHO                                                     ~10
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.05 ms | 1393 KiB | 13 Q