- The introduction covers the comparison operators you need for this exercise.
- You may also review the comparison operators documentation.
- Compare
$speedwith the boundary values from the table (===,>=,>,<=, or<as needed). - You can use a simple
ifstatement to return the matching success rate.
- Reuse the
successRate()method you wrote earlier:$this->successRate($speed). - Multiply
221,$speed, and the success rate. - PHP can multiply integers and floating-point numbers together; the result may be a float.
- Use a not-identical comparison (
!==) against0. - Return the boolean result of that comparison.
- The spaceship operator (
<=>) returns-1,0, or1directly.