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); return $hours; } echo calcDays(1388385927, 1388390027);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ukQaJ
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     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/ukQaJ
function name:  calcDays
number of ops:  23
compiled vars:  !0 = $startdate, !1 = $enddate, !2 = $first, !3 = $second, !4 = $inbetween, !5 = $hours
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                                                     ~6, ->6
          4    >   QM_ASSIGN                                        ~7      !0
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~7      !1
          7    >   ASSIGN                                                   !2, ~7
    5     8        IS_SMALLER                                               !0, !1
          9      > JMPZ                                                     ~9, ->12
         10    >   QM_ASSIGN                                        ~10     !1
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~10     !0
         13    >   ASSIGN                                                   !3, ~10
    6    14        SUB                                              ~12     !3, !2
         15        ASSIGN                                                   !4, ~12
    8    16        INIT_FCALL                                               'floor'
         17        DIV                                              ~14     !4, 60
         18        SEND_VAL                                                 ~14
         19        DO_ICALL                                         $15     
         20        ASSIGN                                                   !5, $15
   10    21      > RETURN                                                   !5
   11    22*     > RETURN                                                   null

End of function calcdays

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.46 ms | 1399 KiB | 16 Q