If the train drives slow enough that is takes 3s between when your head gets through and your feed are trough, it also needs to take 3s on the other side or you are ripped to pieces or squashed.
Now if it takes 0.1s, you also have to come out in this time and will have a velocity, the same as the train.
Yes, if the speed you go in wouldn't the speed you go out, you'd be ripped apart.
In portal (the whole point of this joke), it happens instantly an works like walking through a door. If your hand is through, it's at the other side and the rest of your body isn't.
If you would travel at the same direction and speed of the train, you could step through and be stationary at the other side. If you stand still and the train travels to you, the only "logical" answer is that you fly out the other side or be ripped apart.