If you have the "knob" for selecting the forward or reverse gear. The advice I received from a very knowledgeable Ram mechanic was, " before placing vehicle in "P" set the parking brake and then place the selector into "P"
This will ensure the truck doesn't run over you as your getting out of the driver's door and it's rolling.
I asked why he would give such advice, his comment was, every body thinks they put it in park, but sometimes you just have to believe they just turned the radio down and we're confused. He had investigated enough of the complains about trucks rolling that he knew not every one was bad.
Now I'm not certain if he is right or wrong, I do know, based on his advice, I set my parking brake every time I leave the truck, even if it's parked in the garage on a flat surface.
And of course we have the nanny software update that does the same thing.