  (Abridged) We studied the evolution in the B band luminosity function to z~1
in the zCOSMOS 10k sample, for which both accurate galaxy classifications and a
detailed description of the local density field are available.
  The global LF exhibits a brightening of ~0.7 mag in M* from z~0.2 to z~0.9.
At low z, late types dominate at faint magnitudes, while the bright end is
populated mainly by early types. At higher z, late-type galaxies evolve
significantly and, at z~1, the contribution from the various types to the
bright end of the LF is comparable. The evolution for early types is in both
luminosity and normalization. A similar behaviour is exhibited by late types,
but with an opposite trend for the normalization. Studying the role of the
environment, we find that the global LF of galaxies in overdense regions has
always a brighter M* and a flatter slope. In low density environments, the main
contribution to the LF is from blue galaxies, while for high density
environments there is an important contribution from red galaxies to the bright
end. The differences between the global LF in the two environments are not due
to only a difference in the relative numbers of red and blue galaxies, but also
to their relative luminosity distributions: the value of M* for both types in
underdense regions is always fainter than in overdense environments.
  The "specular" evolution of late- and early-type galaxies is consistent with
a scenario where a part of blue galaxies is transformed in red galaxies with
increasing cosmic time, without significant changes in the fraction of
intermediate-type galaxies. The bulk of this tranformation in overdense regions
probably happened before z~1, while it is still ongoing at lower z in
underdense environments.
