Using Gutzwiller-projected wave functions, I estimate the ground-state energy of the t-J model for several variational states relevant for high-temperature cuprate superconductors. The results indicate antiferromagnetism and phase separation at low doping both in the superconducting state and in the staggered-flux normal state proposed for the vortex cores. While phase separation in the underdoped superconducting state may be relevant for the stripe formation mechanism, the results for the normal state suggest that similar charge inhomogeneities may also appear in vortex cores up to relatively high doping values.