  The formation of planets within a disc must operate within the time frame of
disc dispersal, it is thus crucial to establish what is the dominant process
that disperses the gaseous component of discs around young stars. Planet
formation itself as well as photoevaporation by energetic radiation from the
central young stellar object have been proposed as plausible dispersal
mechanisms. [abridged]. In this paper we use the different metallicity
dependance of X-ray photoevaporation and planet formation to discriminate
between these two processes. We study the effects of metallicity, Z, on the
dispersal timescale, t_phot, in the context of a photoevaporation model, by
means of detailed thermal calculations of a disc in hydrostatic equilibrium
irradiated by EUV and X-ray radiation from the central source. Our models show
t_phot \propto Z^0.52 for a pure photoevaporation model. By means of analytical
estimates we derive instead a much stronger negative power dependance on
metallicity of the disc lifetime for a dispersal model based on planet
formation. A census of disc fractions in lower metallicity regions should
therefore be able to distinguish between the two models. A recent study by
Yasui et al. in low metallicity clusters of the extreme outer Galaxy ([O/H] ~-
0.7dex and dust to gas ratio of ~0.001) provides preliminary observational
evidence for shorter disc lifetimes at lower metallicities, in agreement with
the predictions of a pure photoevaporation model. [abridged] We finally develop
an analytical framework to study the effects of metallicity dependent
photoevaporation on the formation of gas giants in the core accretion scenario.
We show that accounting for this effect strengthens the conclusion that planet
formation is favoured at higher metallicity. [abridged]
