We have used magnetophotoluminescence to study the impact of different capping layer material combinations (InP, GaInAsP quaternary alloy, or both InP and quaternary alloy) on lateral confinement in InAs/InP quantum dots (QDs) grown on (311)B orientated substrates. Exciton effective masses, Bohr radii, and binding energies are measured for these samples. Conclusions regarding the strength of the lateral confinement in the different samples are supported by photoluminescence at high excitation power. Contrary to theoretical predictions, InAs QDs in quaternary alloy are found to have better confinement properties than InAs/InP QDs. This is attributed to a lack of lateral intermixing with the quaternary alloy, which is present when InP is used to (partially) cap the dots. The implications of the results for reducing the temperature sensitivity of QD lasers are discussed.