3v4l.org

run code in 300+ PHP versions simultaneously
<?php $row2['post_date'] = "2013-12-02 10:00:00"; $now = new DateTime(); $post = new DateTime($row2[post_date]); $interval = $datetime1->diff($datetime2); echo "Updated " . $interval->format('h') . " hours ago";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lK8sW
function name:  (null)
number of ops:  23
compiled vars:  !0 = $row2, !1 = $now, !2 = $post, !3 = $interval, !4 = $datetime1, !5 = $datetime2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                               !0, 'post_date'
          1        OP_DATA                                                  '2013-12-02+10%3A00%3A00'
    4     2        NEW                                              $7      'DateTime'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $7
    5     5        NEW                                              $10     'DateTime'
          6        CHECK_FUNC_ARG                                           
          7        FETCH_CONSTANT                                   ~11     'post_date'
          8        FETCH_DIM_FUNC_ARG                               $12     !0, ~11
          9        SEND_FUNC_ARG                                            $12
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $10
    6    12        INIT_METHOD_CALL                                         !4, 'diff'
         13        SEND_VAR_EX                                              !5
         14        DO_FCALL                                      0  $15     
         15        ASSIGN                                                   !3, $15
    7    16        INIT_METHOD_CALL                                         !3, 'format'
         17        SEND_VAL_EX                                              'h'
         18        DO_FCALL                                      0  $17     
         19        CONCAT                                           ~18     'Updated+', $17
         20        CONCAT                                           ~19     ~18, '+hours+ago'
         21        ECHO                                                     ~19
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.71 ms | 1394 KiB | 13 Q