If a man says to his wife in a joke "You are divorced" or "I divorce you", has a divorce actually taken place?
If a man intentionally and explicitly makes a pronouncement of divorce, then that divorce has occurred. It does not matter if there were witnesses or not. It does not matter if the wife was present or not. It does not matter if he was serious or merely joking.
The Prophet (peace be upon him) said: “There are three matters that will be taken seriously whether they were meant seriously or in jest: marriage, divorce, and taking a divorced wife back before the divorce is finalized.” [Related by Abû Dâwûd and al-Tirmidhî who declared it a sound hadîth].
The majority of the people of knowledge hold the same opinion, as mentioned by Ibn al-Mundhir.
Source: Islam Today
-- Al Arabiya Digital