3v4l.org

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

Function diffindays:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vRgCF
function name:  diffInDays
number of ops:  12
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                                           ~4      !2, ~3
          4      > RETURN                                                   ~4
    5     5*       INIT_FCALL                                               'floor'
          6*       DIV                                              ~5      !2, 3600
          7*       DIV                                              ~6      ~5, 24
          8*       SEND_VAL                                                 ~6
          9*       DO_ICALL                                         $7      
         10*       RETURN                                                   $7
    6    11*     > RETURN                                                   null

End of function diffindays

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.31 ms | 1398 KiB | 20 Q