3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = date('2022-01-20 10:32'); $now = date('Y-m-d H:i:s'); echo round((strtotime($now) - strtotime($start))/(60*60));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sLK7Y
function name:  (null)
number of ops:  21
compiled vars:  !0 = $start, !1 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 '2022-01-20+10%3A32'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    4     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !1, $4
    6     8        INIT_FCALL                                               'round'
          9        INIT_FCALL                                               'strtotime'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        INIT_FCALL                                               'strtotime'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $7      
         15        SUB                                              ~8      $6, $7
         16        DIV                                              ~9      ~8, 3600
         17        SEND_VAL                                                 ~9
         18        DO_ICALL                                         $10     
         19        ECHO                                                     $10
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.86 ms | 1398 KiB | 20 Q