Does erase and deleting all contant on iphone get rid of everything?

Like does it delete all internet history and everything?

Yes, it removes everything and brings you to the setup screen just like when you first got it. The only thing it doesn't remove is the iOS version