P-spaces and Whyburn property