"This is very similar to what happens in some eruptions: indeed, pumice is merely solidified magma foam. The volatilecontent (the percentage of dissolved water) and de-gassing history of a magma play a large part in dictating its behaviour should it reach the Earth's surface."