The concept of optical phase discontinuities is applied to the design and demonstration of aberration-free planar lenses and axicons, comprising a phased array of ultrathin subwavelength-spaced optical antennas. The lenses and axicons consist of V-shaped nanoantennas that introduce a radial distribution of phase discontinuities, thereby generating respectively spherical wavefronts and nondiffracting Bessel beams at telecom wavelengths. Simulations are also presented to show that our aberration-free designs are applicable to high-numerical aperture lenses such as flat microscope objectives.