3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = "2013-03-01 19:12:45"; $date2 = "2014-03-01 06:37:04"; //Convert them to timestamps. $date1Timestamp = strtotime($date1); $date2Timestamp = strtotime($date2); //Calculate the difference. $difference = $date2Timestamp - $date1Timestamp; echo $difference;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/daOr9
function name:  (null)
number of ops:  14
compiled vars:  !0 = $date1, !1 = $date2, !2 = $date1Timestamp, !3 = $date2Timestamp, !4 = $difference
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2013-03-01+19%3A12%3A45'
    3     1        ASSIGN                                                   !1, '2014-03-01+06%3A37%3A04'
    6     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !2, $7
    7     6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $9      
          9        ASSIGN                                                   !3, $9
   10    10        SUB                                              ~11     !3, !2
         11        ASSIGN                                                   !4, ~11
   12    12        ECHO                                                     !4
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.49 ms | 1394 KiB | 15 Q