$lower) { if($lower == $temp) { if($real != $pathInfo['basename']) { echo "Duplicate: ".$pathInfo['basename'] . " => ". $real ."\n";; } } } $all[$pathInfo['basename']] = $temp; }