3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sdate = "2014-01-02"; $edate = "2013-01-02"; $t=strtotime($edate); $t1=strtotime($sdate); print "$t"; print "$t1"; /*$date_diff = abs(strtotime($edate) - strtotime($sdate)); print "$date_diff"; $years = floor($date_diff / (365*60*60*24)); $months = floor(($date_diff - $years * 365*60*60*24) / (30*60*60*24)); $days = floor(($date_diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); printf("%d years, %d months, %d days", $years, $months, $days);*/ ?> - See more at: http://www.w3resource.com/php-exercises/php-date-exercises.php#sthash.xJA52BEw.dpuf
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i7cX5
function name:  (null)
number of ops:  16
compiled vars:  !0 = $sdate, !1 = $edate, !2 = $t, !3 = $t1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2014-01-02'
    3     1        ASSIGN                                                   !1, '2013-01-02'
    4     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !2, $6
    5     6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !3, $8
    6    10        CAST                                          6  ~10     !2
         11        ECHO                                                     ~10
    7    12        CAST                                          6  ~11     !3
         13        ECHO                                                     ~11
   17    14        ECHO                                                     '++%0A-+See+more+at%3A+http%3A%2F%2Fwww.w3resource.com%2Fphp-exercises%2Fphp-date-exercises.php%23sthash.xJA52BEw.dpuf'
   18    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.73 ms | 1394 KiB | 15 Q