P. miles is usually found in areas with crevices or lagoons, often on the outer slopes of coral reefs.[6] Moray eels have recently been identified as natural predators of P. miles in its native habitat in the Red Sea.[7] Some grouper species and reef sharks are also its predators.