3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new \DateTime('-1 day'); $date2 = new \DateTime(); $minutes = ($date2->getTimestamp() - $date1->getTimestamp())/60; var_dump($minutes);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eq79k
function name:  (null)
number of ops:  18
compiled vars:  !0 = $date1, !1 = $date2, !2 = $minutes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '-1+day'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    3     4        NEW                                              $6      'DateTime'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
    5     7        INIT_METHOD_CALL                                         !1, 'getTimestamp'
          8        DO_FCALL                                      0  $9      
          9        INIT_METHOD_CALL                                         !0, 'getTimestamp'
         10        DO_FCALL                                      0  $10     
         11        SUB                                              ~11     $9, $10
         12        DIV                                              ~12     ~11, 60
         13        ASSIGN                                                   !2, ~12
    6    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.62 ms | 1450 KiB | 14 Q