3v4l.org

run code in 300+ PHP versions simultaneously
<?php function diffInDays($date1,$date2) { $diff = $date1-$date2; return floor($diff/(60*60*24)); } echo diffInDays('2014-05-30',time());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RtIeC
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'diffindays'
          1        SEND_VAL                                                 '2014-05-30'
          2        INIT_FCALL                                               'time'
          3        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        DO_FCALL                                      0  $1      
          6        ECHO                                                     $1
          7      > RETURN                                                   1

Function diffindays:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RtIeC
function name:  diffInDays
number of ops:  10
compiled vars:  !0 = $date1, !1 = $date2, !2 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        SUB                                              ~3      !0, !1
          3        ASSIGN                                                   !2, ~3
    5     4        INIT_FCALL                                               'floor'
          5        DIV                                              ~5      !2, 86400
          6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
          8      > RETURN                                                   $6
    6     9*     > RETURN                                                   null

End of function diffindays

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.8 ms | 1397 KiB | 18 Q