3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt1 = getdate(); $dt2 = getdate(); $date1 = date_create("".$dtl.""); $date2 = date_create("".$dt2.""); $dateDiff = date_diff($date2, $date1); $probDays = $dateDiff->days; $probMon = $dateDiff->m; $probYear = $dateDiff->y; $month = $probDays / 30; $totLeave = $month * 1; if($month > $probmon) { $totLeave = $totLeave + 1; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 37
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/tGsoR
function name:  (null)
number of ops:  38
compiled vars:  !0 = $dt1, !1 = $dt2, !2 = $date1, !3 = $dtl, !4 = $date2, !5 = $dateDiff, !6 = $probDays, !7 = $probMon, !8 = $probYear, !9 = $month, !10 = $totLeave, !11 = $probmon
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'getdate'
          1        DO_ICALL                                         $12     
          2        ASSIGN                                                   !0, $12
    3     3        INIT_FCALL                                               'getdate'
          4        DO_ICALL                                         $14     
          5        ASSIGN                                                   !1, $14
    5     6        INIT_FCALL                                               'date_create'
          7        CONCAT                                           ~16     '', !3
          8        CONCAT                                           ~17     ~16, ''
          9        SEND_VAL                                                 ~17
         10        DO_ICALL                                         $18     
         11        ASSIGN                                                   !2, $18
    7    12        INIT_FCALL                                               'date_create'
         13        CONCAT                                           ~20     '', !1
         14        CONCAT                                           ~21     ~20, ''
         15        SEND_VAL                                                 ~21
         16        DO_ICALL                                         $22     
         17        ASSIGN                                                   !4, $22
    9    18        INIT_FCALL                                               'date_diff'
         19        SEND_VAR                                                 !4
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $24     
         22        ASSIGN                                                   !5, $24
   11    23        FETCH_OBJ_R                                      ~26     !5, 'days'
         24        ASSIGN                                                   !6, ~26
   12    25        FETCH_OBJ_R                                      ~28     !5, 'm'
         26        ASSIGN                                                   !7, ~28
   13    27        FETCH_OBJ_R                                      ~30     !5, 'y'
         28        ASSIGN                                                   !8, ~30
   15    29        DIV                                              ~32     !6, 30
         30        ASSIGN                                                   !9, ~32
   16    31        MUL                                              ~34     !9, 1
         32        ASSIGN                                                   !10, ~34
   18    33        IS_SMALLER                                               !11, !9
         34      > JMPZ                                                     ~36, ->37
   20    35    >   ADD                                              ~37     !10, 1
         36        ASSIGN                                                   !10, ~37
   22    37    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.26 ms | 1396 KiB | 19 Q