Meaning of “whoever” - Learner’s Dictionary

whoever

pronoun uk us /huːˈevər/
WHICH PERSON

B2 the person who:

Whoever broke the window will have to pay for it.
Could I speak to whoever is in charge please?
ANY PERSON

B2 used to say that it is not important which person or group does something:

Can whoever leaves last lock up, please?
SURPRISE

used to ask who a person is when expressing surprise:

Whoever could that be phoning at this time?
Whoever would believe such a ridiculous story?

(Definition of “whoever” from the Cambridge Learner’s Dictionary © Cambridge University Press)