[MENTION=6670153]gyor[/MENTION] [MENTION=6801845]Oofta[/MENTION], [MENTION=6812267]Ganymede81[/MENTION]
If my DM did this, I would be very disappointed about wasting my spells. I'd feel like the DM was just a fun-killer.
I would let my player know what's going to happen. But my players also know that if they abuse spells I will use the same tactics on them.
Purple worms specifically regurgitate swallowed contents based on damage, the sphere specifically states that it can only contain large creatures. I'm basing my reasoning on the description of the creature/spell.
In addition, I don't believe in save or die (with a few exceptions like disintegrate) - for monsters or PCs.