An 8 feet long foam board with three fins is the best choice to learn how to surf. Or a 9 feet if you're really tall or heavy.
Why? Because:
It doesn't hurt when you fall on it.
It's very resistant to impacts and bumps.
It's the choice of a every surf schools around the world, teaching people to surf and to progress in the sport.
It's wide, thick and long which means it's very stable.
It's easy to paddle on it.
In several years, when you will have a decent level in surfing, you'll still ride it as a longboard when waves are small, like during the summer season in France for example. And when the spot is crowded, to avoid dangerous collisions with people paddling in front of your wave, it's the safer option.
Plus, you'll still have a lot of fun with your foam board. Take a look at Jamie O'Brien for example: