private function hasArrayDuplicates($array)
    {
        $compare = array();
        foreach ($array as $element) {
            // duplicate element found
            if (in_array($element, $compare, true)) {
                return true;
            } else {
                // add element to temporary array to check for duplicates
                $compare [] = $element;
            }
        }

        return false;
    }
private function hasArrayDuplicates($array)
    {
        $compare = array();
        foreach ($array as $element) {
            // duplicate element found
            if (in_array($element, $compare, true)) {
                return true;
            } else {
                // add element to temporary array to check for duplicates
                $compare [] = $element;
            }
        }

        return false;
    }
private function hasArrayDuplicates ( $ array ) { $ compare = array ( ) ; foreach ( $ array as $ element ) { // duplicate element found if ( in_array ( $ element , $ compare , true ) ) { return true ; } else { // add element to temporary array to check for duplicates $ compare [ ] = $ element ; } } return false ; }
checks whether ths given array contains duplicate identical entries

@param  array $array
@return bool
checks whether ths given array contains duplicate identical entries