3v4l.org

run code in 300+ PHP versions simultaneously
<?php function diffInDays($date1,$date2) { return $diff = $date1-$date2; return floor($diff/(60*60*24)); } echo diffInDays(date('2014-05-30'),date());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mVk3h
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                                               'date'
          2        SEND_VAL                                                 '2014-05-30'
          3        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        INIT_FCALL                                               'date'
          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/mVk3h
function name:  diffInDays
number of ops:  11
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, 86400
          7*       SEND_VAL                                                 ~5
          8*       DO_ICALL                                         $6      
          9*       RETURN                                                   $6
    6    10*     > RETURN                                                   null

End of function diffindays

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.82 ms | 1398 KiB | 18 Q