3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ts = DateTime::createFromFormat('U', strtotime('-93 minutes')); $now = new DateTime(); $diff = $now->diff($ts); echo $diff->format('%h hours %i minutes ago'), "\n"; var_export($diff);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/boSmG
function name:  (null)
number of ops:  24
compiled vars:  !0 = $ts, !1 = $now, !2 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          1        SEND_VAL                                                 'U'
          2        INIT_FCALL                                               'strtotime'
          3        SEND_VAL                                                 '-93+minutes'
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        DO_FCALL                                      0  $4      
          7        ASSIGN                                                   !0, $4
    3     8        NEW                                              $6      'DateTime'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $6
    4    11        INIT_METHOD_CALL                                         !1, 'diff'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0  $9      
         14        ASSIGN                                                   !2, $9
    5    15        INIT_METHOD_CALL                                         !2, 'format'
         16        SEND_VAL_EX                                              '%25h+hours+%25i+minutes+ago'
         17        DO_FCALL                                      0  $11     
         18        ECHO                                                     $11
         19        ECHO                                                     '%0A'
    6    20        INIT_FCALL                                               'var_export'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.58 ms | 1395 KiB | 17 Q