Plan b before sex ?

Just curious what would happen if you took it before you had sex. Not that I'm going to do it I just had a thought & if anyone tried it.