• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
ignium Avatar
Name:Unknown
Clan:Unknown
Member Since:Nov 2019
Last Seen:Jun 2025
Profiles:
    Following:2
    Followers:1
    Allies:1
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (9)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • ignium
      • commented on "Decode the Morse code " php solution
      • 5 years ago

      Ha! Completely missed the fact that MORSE_CODE was defined already. Oops.

    • Custom User Avatar
      • ignium
      • commented on "Sort Out The Men From Boys " php solution
      • 5 years ago

      Looking back, it's probably better to remove the duplicates in the foreach statement to make the function more efficient (foreach array_unique($arr) as $item) then just return the values of the merged array.

    • Custom User Avatar
      • ignium
      • commented on ""The Deaf Rats of Hamelin" PHP Translation"
      • 6 years ago

      Congrats on writing some PHP! You're right! I forgot array_rand() returns a random key, I should have put array_rand(array_flip(['L', 'M', 'R']) this would flip the key value pairs (eg. as a JavaScript object {0: 'L', 1: 'M', 2: 'R'} would become {L: 0, M: 1, R: 2}) then return a random key from that array, which would be the letter. This was my first translation, I appreciate the patience and help!

    • Custom User Avatar
      • dinglemouse
      • commented on ""The Deaf Rats of Hamelin" PHP Translation"
      • 6 years ago

      Your usage of array_rand was also broken (returned index not the letter).

      I wrote my first ever PHP code to fix it ;-)

      ... and added output to verify it.

    • Custom User Avatar
      • ignium
      • commented on ""The Deaf Rats of Hamelin" PHP Translation"
      • 6 years ago

      Sorry for the radio silence! I didn't realize I had to confirm my email to comment! Tried several times on a couple of different browsers and clicking send just moved a status bar on the top but never posted the comments. There's no message that indicates you have to confirm your email first. Ended up finding the solution on a GitHub issue from 2016!

    • Custom User Avatar
      • ignium
      • commented on ""The Deaf Rats of Hamelin" PHP Translation"
      • 6 years ago

      I stupidly had the options of left, middle, CENTER for the piper position when generating random tests. I ran the randoms a couple of times it's strange I never came across the issue of it never picking "center". It should be fixed now though!

    • Custom User Avatar
      • Blind4Basics
      • commented on ""The Deaf Rats of Hamelin" PHP Translation"
      • 6 years ago

      @Ignium: plz see the issue in the discrouse => your random tests are wrong.

    • Custom User Avatar
      • dinglemouse
      • commented on ""The Deaf Rats of Hamelin" PHP Translation"
      • 6 years ago

      thanks. approved :-)

    • Custom User Avatar
      • dinglemouse
      • commented on ""The Deaf Rats of Hamelin" PHP Translation"
      • 6 years ago

      Please group the tests (and name those tests) more similar to original so I can more easily check the code

    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...