Ad
  • Custom User Avatar

    I got the same problem, did you solve this issue by any chance?

  • Custom User Avatar

    i usually use the php manual for the PHP katas

  • Custom User Avatar

    Your PHP function doesn't account for all possible game outcomes, specifically the cases where "rock" and "paper" are played against each other. Since your function doesn't return anything for those cases, it returns null by default, which leads to the failed test cases. To fix this issue, you need to add conditions to handle the missing game outcomes: when "rock" plays against "paper" and vice versa. Make sure your function returns a result for every possible combination of inputs it might receive, ensuring it never unintentionally returns null.

    Your solution has a bug, it's not a kata issue.

  • Custom User Avatar

    In PHP when i run my code through test it passes, but when i hit attempt it returns the following issues:

    (testrpcBasics) Failed asserting that null is identical to 'Player 1 won!'.

    (test 1) Failed asserting that null is identical to 'Player 1 won!'.

    (test 2) Failed asserting that null is identical to 'Player 2 won!'.

  • Custom User Avatar

    That's just a formatting preference. What's I think is a bad formatting preference is putting anything after a scope-closing } on the same line.

  • Custom User Avatar

    Just a minor Feedback:
    if you're using the curlybrackets, then put them in the next row so the code is simpler to read.