-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.php
35 lines (26 loc) · 1.06 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
include_once 'vendor/autoload.php';
$principal = 50000;
$yearInterestRate = 0.10;
$month = 12;
$time = 0;
echo <<<str
principal: $principal;
yearInterestRate: $yearInterestRate
month: $month
str;
//$obj = new \Zwei\LoanCalculator\Calculator\EqualPrincipalPaymentCalculator($principal, $yearInterestRate, $month, 0);
//$lists = $obj->getPlanLists();
//print_r($lists);
//$obj = new \Zwei\LoanCalculator\Calculator\EqualTotalPaymentCalculator($principal, $yearInterestRate, $month, 0);
//$lists = $obj->getPlanLists();
//print_r($lists);
//$obj = new \Zwei\LoanCalculator\Calculator\MonthlyInterestPaymentCalculator($principal, $yearInterestRate, $month, 0);
//$lists = $obj->getPlanLists();
//print_r($lists);
//$obj = new \Zwei\LoanCalculator\Calculator\OncePayPrincipalInterestPaymentCalculator($principal, $yearInterestRate, $month, 0);
//$lists = $obj->getPlanLists();
//print_r($lists);
$obj = new \Zwei\LoanCalculator\Calculator\FirstInterestLastPrincipalPaymentCalculator($principal, $yearInterestRate, $month, 0);
$lists = $obj->getPlanLists();
print_r($lists);