  We characterize stability under composition of ultradifferentiable classes
defined by weight sequences $M$, by weight functions $\omega$, and, more
generally, by weight matrices $\mathfrak{M}$, and investigate continuity of
composition $(g,f) \mapsto f \circ g$. In addition, we represent the Beurling
space $\mathcal{E}^{(\omega)}$ and the Roumieu space $\mathcal{E}^{\{\omega\}}$
as intersection and union of spaces $\mathcal{E}^{(M)}$ and
$\mathcal{E}^{\{M\}}$ for associated weight sequences, respectively.
