Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Although not explicitly stated, the sample tests indicate that the price isn't always an integer, so your calculation might be wrong, and also you type hint the input (see what happened when in not strict mode?).

    Closing as this is not an issue with the tests.

  • Custom User Avatar

    That's not the test you're failing. You have a flawed first if condition, and return an incorrect value, so you don't even print the array of actual failing test. Try moving your if condition after print_r.

    Make sure to read the last line of description carefully. null isn't the same as empty array.

    The issue is in your code, not the kata itself.