Skip to content

Instantly share code, notes, and snippets.

@chuckreynolds
Last active March 17, 2017 21:13
Show Gist options
  • Save chuckreynolds/4359c507ea5556b8f1bca9b84909b4a1 to your computer and use it in GitHub Desktop.
Save chuckreynolds/4359c507ea5556b8f1bca9b84909b4a1 to your computer and use it in GitHub Desktop.
<?php
function employeeGrowth ( int $employees, int $employees_6_months_ago) {
$employee_percent_change = ($employees - $employees_6_months_ago)/$employees_6_months_ago;
$formatter = new NumberFormatter('en_US', NumberFormatter::PERCENT);
echo $formatter->format($employee_percent_change);
}
$employees = 26258;
$employees_6_months_ago = 21011;
employeeGrowth($employees,$employees_6_months_ago);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment