This was mentioned in another thread a while ago. In my experience a have pressed the P when the car was speeding and nothing happened. But be aware in very low speed when the car is just rolling because it also happened once in my garage the car was just rolling and I pressed P by mistake and I heard a big noise

and the car stopped immediately .... this could easily break something but i was lucky.