Last active
February 24, 2020 08:03
-
-
Save nielslange/a12915f10955f50c8263df6811272dbe to your computer and use it in GitHub Desktop.
https://www.codewars.com/kata/585d7d5adb20cf33cb000235/php - Best practice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function find_uniq($a) { | |
sort($a); | |
return ($a[0] === $a[1]) ? end($a) : current($a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment