Exercise: rectangle perimeter
Write a function function perimeter($width, $height) that returns the perimeter of a rectangle with sides $width and $height. The perimeter is the sum of the lengths of all four sides.
perimeter(3, 5)→16perimeter(1, 1)→4perimeter(0, 7)→14
Constraints: the sides are integers from 0 to 1000, and one or both of them may be zero.
The checks are on the perimeter_test.php tab: you can read them but not change them. Each check calls perimeter with the numbers in its name: test_perimeter_3_5 calls perimeter(3, 5) and compares the result with the expected one. The rest of the code in that file comes in later themes.
A failed check prints the line FAIL test_perimeter_3_5 and below it perimeter(3, 5): want 16, got -1. The number after want is what was expected; the one after got is what your function returned. If your code has a parse error, a Parse error message appears instead of the check results, and no check runs.
Keep the declaration function perimeter($width, $height) as it is: the checks call the function by this name and pass it two numbers.
Do not add extra require or use lines unless the task says so explicitly.