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/g92ZY
function name:  (null)
number of ops:  25
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, 60
         15        MUL                                              ~12     ~11, 60
         16        MUL                                              ~13     ~12, 24
         17        SEND_VAL                                                 ~13
         18        DO_ICALL                                         $14     
         19        ASSIGN                                                   !3, $14
   10    20        INIT_FCALL                                               'printf'
         21        SEND_VAL                                                 '%25d+days%0A'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.53 ms | 1386 KiB | 21 Q