I would like to check if my array has any duplicates and return the duplicated values in an array. I want this to be as efficient as possible.
Example:
$duplicate_array = array();
for($i=0;$i