3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Query timestamp of entry //returns like this $entrydatetime = "2013-11-21 17:36:18"; //get current time $now = new \DateTime(); // Use DateTime on $entrydatetime $entrydatetime = new \DateTime($entrydatetime); $age = $entrydatetime->diff($now); // DateInterval $age->format('%a days');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rRtf1
function name:  (null)
number of ops:  16
compiled vars:  !0 = $entrydatetime, !1 = $now, !2 = $age
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, '2013-11-21+17%3A36%3A18'
   10     1        NEW                                              $4      'DateTime'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   13     4        NEW                                              $7      'DateTime'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $7
   15     8        INIT_METHOD_CALL                                         !0, 'diff'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !2, $10
   18    12        INIT_METHOD_CALL                                         !2, 'format'
         13        SEND_VAL_EX                                              '%25a+days'
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.73 ms | 1393 KiB | 13 Q