All depends on density, those styro boxes they ship meat and live fish in will hold water. The cheap ones you get at the supermarket may hold water but the slightest imperfection in the supporting sub-surface will fracture the bottom, add the side stress of water and it's a gamble, they're soft foam. There are all different grades/densities of foam these days. They make very expensive coolers out of foam and an epoxy shell that you can stand on.
I'm not really here... fell in the tank and my phone is just that smart