3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = "2007-03-24"; $date2 = "2009-06-26"; $diff = abs(strtotime($date2) - strtotime($date1)); $days = floor($diff / (60*60*24)); printf("%d days\n", $days);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tV0A1
function name:  (null)
number of ops:  23
compiled vars:  !0 = $date1, !1 = $date2, !2 = $diff, !3 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2007-03-24'
    3     1        ASSIGN                                                   !1, '2009-06-26'
    5     2        INIT_FCALL                                               'abs'
          3        INIT_FCALL                                               'strtotime'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $7      
          9        SUB                                              ~8      $6, $7
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
    8    13        INIT_FCALL                                               'floor'
         14        DIV                                              ~11     !2, 86400
         15        SEND_VAL                                                 ~11
         16        DO_ICALL                                         $12     
         17        ASSIGN                                                   !3, $12
   10    18        INIT_FCALL                                               'printf'
         19        SEND_VAL                                                 '%25d+days%0A'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.36 ms | 1395 KiB | 21 Q