Created
April 21, 2020 08:15
-
-
Save tuupola/90a93d9b997d16d4e6de87ba3c1f94f8 to your computer and use it in GitHub Desktop.
This file contains 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 pmt($interest, $payments, $pv, $fc = 0.00, $type = 0) | |
{ | |
$xp = pow((1 + $interest), $payments); | |
return | |
($pv * $interest * $xp / ($xp - 1) + $interest / ($xp - 1) * $fc) * | |
($type == 0 ? 1 : 1 / ($interest + 1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment