  Electronic nematics, an electron orientational order which breaks the
underlying rotational symmetry, have been observed in iron pnictide
superconductors several years after their discovery. However, the universality
of the doping dependence of this phase and its relation to other
symmetry-breaking orders (such as superconductivity) in distinct families of
iron pnictides, remain outstanding questions. Here we use torque magnetometry
as a probe to study the rotational symmetry breaking in
EuFe$_2$(As$_{1-x}$P$_x$)$_2$ without introducing external pressure. The
nematic phase is found to proliferate well above the structural transition and
to persist into the superconducting regime at optimal doping, after which it
becomes absent or very weak, in sharp contrast to the behaviour observed in
BaFe$_2$(As$_{1-x}$P$_x$)$_2$. These measurements suggest a putative quantum
nematic transition near optimal doping under the superconducting dome.
