3v4l.org

run code in 300+ PHP versions simultaneously
<?php function calcDays($startdate, $enddate) { $first = $startdate < $enddate ? $startdate : $enddate; $second = $startdate < $enddate ? $enddate : $startdate; $inbetween = $second - $first; $hours = floor($inbetween / 60 / 60); $minutes = floor($inbetween / 60 - $hours / 60); return $hours . " " . $minutes; } echo calcDays(1388385927, 1388390027);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kj0v0
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'calcdays'
          1        SEND_VAL                                                 1388385927
          2        SEND_VAL                                                 1388390027
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function calcdays:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
Branch analysis from position: 12
filename:       /in/Kj0v0
function name:  calcDays
number of ops:  33
compiled vars:  !0 = $startdate, !1 = $enddate, !2 = $first, !3 = $second, !4 = $inbetween, !5 = $hours, !6 = $minutes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        IS_SMALLER                                               !0, !1
          3      > JMPZ                                                     ~7, ->6
          4    >   QM_ASSIGN                                        ~8      !0
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~8      !1
          7    >   ASSIGN                                                   !2, ~8
    5     8        IS_SMALLER                                               !0, !1
          9      > JMPZ                                                     ~10, ->12
         10    >   QM_ASSIGN                                        ~11     !1
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~11     !0
         13    >   ASSIGN                                                   !3, ~11
    6    14        SUB                                              ~13     !3, !2
         15        ASSIGN                                                   !4, ~13
    8    16        INIT_FCALL                                               'floor'
         17        DIV                                              ~15     !4, 60
         18        DIV                                              ~16     ~15, 60
         19        SEND_VAL                                                 ~16
         20        DO_ICALL                                         $17     
         21        ASSIGN                                                   !5, $17
    9    22        INIT_FCALL                                               'floor'
         23        DIV                                              ~19     !4, 60
         24        DIV                                              ~20     !5, 60
         25        SUB                                              ~21     ~19, ~20
         26        SEND_VAL                                                 ~21
         27        DO_ICALL                                         $22     
         28        ASSIGN                                                   !6, $22
   11    29        CONCAT                                           ~24     !5, '+'
         30        CONCAT                                           ~25     ~24, !6
         31      > RETURN                                                   ~25
   12    32*     > RETURN                                                   null

End of function calcdays

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.47 ms | 1403 KiB | 16 Q