private function detectDuplicates(array $digits)
    {
        for ($i = count($digits); $i > 0; $i--) {
            if (array_search(array_pop($digits), $digits) !== false) {
                return true;
            }
        }

        return false;
    }
private function detectDuplicates(array $digits)
    {
        for ($i = count($digits); $i > 0; $i--) {
            if (array_search(array_pop($digits), $digits) !== false) {
                return true;
            }
        }

        return false;
    }
private function detectDuplicates ( array $ digits ) { for ( $ i = count ( $ digits ) ; $ i > 0 ; $ i -- ) { if ( array_search ( array_pop ( $ digits ) , $ digits ) !== false ) { return true ; } } return false ; }
Tells if the list of digits has duplicate values.
@param array $digits The list of digits for the numeral system
@return bool True if the list contains duplicate digits, false if not
Tells if the list of digits has duplicate values .