phrasal
1. chiefly dialect : what kind of — used either inseparably or with a verb and its subject between what and for
what is he for a fool — Shakespeare
— used with an immediately following object of for usually consisting of a singular count noun with indefinite article
what for an apple is that
a plural count noun with no article
what for horses are those
or a mass noun with no article
what for tobacco are you smoking
2. : for what purpose : for what reason : why — usually used with the other words of a question between what and for
what did you do that for
except when used alone — used inseparably at the beginning of a question in some dialects
what for did you do that
3. : punishment especially by blows or by a sharp reprimand
puts his little boy across his knee and gives him what for — Rebecca West
gave him what for in violent Spanish — New Yorker
Mama certainly gave Papa the what for — Marquis James
: rough treatment inflicted especially on an offender
went away to give the … generals what for — J.T.Winterich
: severe pain
my corn's a-giving me what for — A.E.Coppard