Have you ever slowly opened a bottle that contains a carbonated beverage and watched the gas bubbles form on the walls of the bottle? Then as the seal on the bottle is broken, the bubbles grow larger and a hiss of gas escapes from the bottle, followed by a rush of foam. The depressurization and the escape of gas from a beverage is the same process that occurs when magma is depressurized as it emerges from a volcanic vent. The foam is equivalent to what will become scoria on solidification.
