if(count(array_unique($array)) === 1) { // all values in $array are the same } else { // at least 1 value in $array is different }
if(count(array_unique($array, SORT_REGULAR)) < count($array)) { // $array has duplicates } else { // $array does not have duplicates }