Created
June 20, 2013 17:27
-
-
Save otanodesignco/5824764 to your computer and use it in GitHub Desktop.
Php code that determines the payment on a loan. Taken from Visual Basic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function RentalPayment($Principle, $IntRate, $PayPerYear, $NumYears) | |
{ | |
$numer; $denom; $b; $e; | |
$numer = $IntRate * $Principle / $PayPerYear; | |
$e = -($PayPerYear * $NumYears); | |
$b = ($IntRate / $PayPerYear) + 1; | |
$denom = 1 - pow($b, $e); | |
return $numer / $denom; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment