FICA_test - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of FICA_test.php
- <?php
- $WH = 100; // worked hours
- $TP = 500.00; // tips
- $GW = 375.00; // gross wages
- $MW = 5.15; // minimum wage rate
- // Payrate
- $a = $GW / $WH;
- // FICA Tip...
- $b = $WH * $MW;
- // Social Security Wages
- $c = $GW;
- // Tips needed...
- if($c > 0) {
- if($b > $c) {
- if($TP > ($b - $c)) {
- $d = $b - $c;
- } else {
- $d = 0;
- }
- } else {
- $d = 0;
- }
- } elseif($b < $c) {
- if($TP < ($b - $c)) {
- $d = $b - $c;
- } else {
- $d = 0;
- }
- }
- // Tips Subject...
- if($c > 0) {
- if(($TP - $d) > 0) {
- $e = $TP - $d;
- } else {
- $e = 0;
- }
- } elseif(($TP + $d) < 0) {
- $e = $TP - $d;
- } else {
- $e = 0;
- }
- // Test
- if($TP == 0) {
- $x = ((7.25 * $WH) - $GW);
- } elseif(($TP + $GW) > (7.25 * $WH)) {
- $x = 0;
- } else {
- $x = ((7.25 * $WH) - ($TP + $GW));
- }
- echo 'Gross Wages: $'.$GW.'<br>';
- echo 'Worked Hours: '.$WH.'<br>';
- echo 'Tips: $'.$TP.'<br>';
- echo 'Payrate: $'.$a.'<br>';
- echo 'Minimum Wage: $'.$MW.'<br>';
- echo '----------------------<br>';
- echo 'FICA Tip Minimum Wage Requirement: $'.$b.'<br>';
- echo 'Social Security Wages: $'.$c.'<br>';
- echo 'Tips Needed for Minimum Social Security: $'.$d.'<br>';
- echo 'Tips Subject to Security Tip Credit: $'.$x.'<br>';
File Description
- FICA_test
- PHP Code
- 19 Feb-2019
- 1.17 Kb
You can Share it:
Latest PHP Pastes