You're confused with Java. In PHP it is simple, just counter-intuitive and set up to mislead you. It would look like a rock but turn into a viscous liquid as soon as you try to hit the nail and the nails get stuck in it.
Sounds like a description of a non-newtonian fluid, like maize flour mixed with water (which you can compact in your hand but liquefies when thrown), or quicksand.
(Where's my NailDriverDeviceFactoryModuleImpl?)