It really depends on the car. If your car is newer and has a rev limiter in place, then the damage is probably minimal if at all. If it is an older car and doesn't have one, you would already know because your car probably wouldn't be running right now.
Personally, I wouldn't have thought twice about it if I accidentally pressed the gas pedal down for a few seconds while in neutral (maybe now I would because of wasted gas, but that's all). However, I'm not a car expert so there may be something, like valve damage or something, but I can't speak for that.
__________________
|