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 = $now->diff($post); 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/IJSeX
function name:  (null)
number of ops:  22
compiled vars:  !0 = $row2, !1 = $now, !2 = $post, !3 = $interval
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                                              $5      'DateTime'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $5
    5     5        NEW                                              $8      'DateTime'
          6        CHECK_FUNC_ARG                                           
          7        FETCH_DIM_FUNC_ARG                               $9      !0, 'post_date'
          8        SEND_FUNC_ARG                                            $9
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $8
    6    11        INIT_METHOD_CALL                                         !1, 'diff'
         12        SEND_VAR_EX                                              !2
         13        DO_FCALL                                      0  $12     
         14        ASSIGN                                                   !3, $12
    7    15        INIT_METHOD_CALL                                         !3, 'format'
         16        SEND_VAL_EX                                              '%25h'
         17        DO_FCALL                                      0  $14     
         18        CONCAT                                           ~15     'Updated+', $14
         19        CONCAT                                           ~16     ~15, '+hours+ago'
         20        ECHO                                                     ~16
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.77 ms | 1385 KiB | 13 Q