3v4l.org

run code in 300+ PHP versions simultaneously
<?php function calcDays($startdate, $enddate) { $first = $startdate < $enddate ? $startdate : $enddate; $second = $startdate < $enddate ? $enddate : $startdate; return $second - $first; } echo calcDays(1388385927, 1388390027);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nQhJM
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     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/nQhJM
function name:  calcDays
number of ops:  17
compiled vars:  !0 = $startdate, !1 = $enddate, !2 = $first, !3 = $second
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                                                     ~4, ->6
          4    >   QM_ASSIGN                                        ~5      !0
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~5      !1
          7    >   ASSIGN                                                   !2, ~5
    5     8        IS_SMALLER                                               !0, !1
          9      > JMPZ                                                     ~7, ->12
         10    >   QM_ASSIGN                                        ~8      !1
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~8      !0
         13    >   ASSIGN                                                   !3, ~8
    7    14        SUB                                              ~10     !3, !2
         15      > RETURN                                                   ~10
    8    16*     > RETURN                                                   null

End of function calcdays

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.41 ms | 1399 KiB | 14 Q