3v4l.org

run code in 300+ PHP versions simultaneously
<?php $joinDate = '2014-03-22 10:36:33'; $today = date('Y-m-d H:i:s'); $Mdate1 = strtotime($joinDate); $Mdate2 = strtotime($today); $months = '0'; while (strtotime('+1 MONTH', $Mdate1) < $Mdate2) { $months++; $Mdate1 = strtotime('+1 MONTH', $Mdate1); } $Mweeks = abs(strtotime($today) - strtotime($joinDate)) / 604800; echo $months; echo "<br>"; echo $Mweeks; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 15
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 15
Branch analysis from position: 27
Branch analysis from position: 15
filename:       /in/iAFlC
function name:  (null)
number of ops:  43
compiled vars:  !0 = $joinDate, !1 = $today, !2 = $Mdate1, !3 = $Mdate2, !4 = $months, !5 = $Mweeks
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2014-03-22+10%3A36%3A33'
    3     1        INIT_FCALL                                               'date'
          2        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
    4     5        INIT_FCALL                                               'strtotime'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $9      
          8        ASSIGN                                                   !2, $9
    5     9        INIT_FCALL                                               'strtotime'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $11     
         12        ASSIGN                                                   !3, $11
    6    13        ASSIGN                                                   !4, '0'
    7    14      > JMP                                                      ->21
    8    15    >   PRE_INC                                                  !4
    9    16        INIT_FCALL                                               'strtotime'
         17        SEND_VAL                                                 '%2B1+MONTH'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $15     
         20        ASSIGN                                                   !2, $15
    7    21    >   INIT_FCALL                                               'strtotime'
         22        SEND_VAL                                                 '%2B1+MONTH'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                         $17     
         25        IS_SMALLER                                               $17, !3
         26      > JMPNZ                                                    ~18, ->15
   11    27    >   INIT_FCALL                                               'abs'
         28        INIT_FCALL                                               'strtotime'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $19     
         31        INIT_FCALL                                               'strtotime'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                         $20     
         34        SUB                                              ~21     $19, $20
         35        SEND_VAL                                                 ~21
         36        DO_ICALL                                         $22     
         37        DIV                                              ~23     $22, 604800
         38        ASSIGN                                                   !5, ~23
   12    39        ECHO                                                     !4
   13    40        ECHO                                                     '%3Cbr%3E'
   14    41        ECHO                                                     !5
   15    42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.5 ms | 1400 KiB | 19 Q