Attosecond science is based on steering electrons with the electric field of well controlled femtosecond laser pulses. It has led to the generation of extreme-ultraviolet pulses with a duration of less than 100 attoseconds (ref. 3; 1 as = 10(-18) s), to the measurement of intramolecular dynamics (by diffraction of an electron taken from the molecule under scrutiny) and to ultrafast electron holography. All these effects have been observed with atoms or molecules in the gas phase. Electrons liberated from solids by few-cycle laser pulses are also predicted to show a strong light-phase sensitivity, but only very small effects have been observed. Here we report that the spectra of electrons undergoing photoemission from a nanometre-scale tungsten tip show a dependence on the carrier-envelope phase of the laser, with a current modulation of up to 100 per cent. Depending on the carrier-envelope phase, electrons are emitted either from a single sub-500-attosecond interval of the 6-femtosecond laser pulse, or from two such intervals; the latter case leads to spectral interference. We also show that coherent elastic re-scattering of liberated electrons takes place at the metal surface. Owing to field enhancement at the tip, a simple laser oscillator reaches the peak electric field strengths required for attosecond experiments at 100-megahertz repetition rates, rendering complex amplified laser systems dispensable. Practically, this work represents a simple, extremely sensitive carrier-envelope phase sensor, which could be shrunk in volume to about one cubic centimetre. Our results indicate that the attosecond techniques developed with (and for) atoms and molecules can also be used with solids. In particular, we foresee subfemtosecond, subnanometre probing of collective electron dynamics (such as plasmon polaritons) in solid-state systems ranging in scale from mesoscopic solids to clusters and to single protruding atoms.