I really liked some other person's view regarding divorce in joke he is also very knowledgeable person regarding Islamic thing. As scholar quote Hadith:
“There are three matters in which seriousness is serious and joking is serious: marriage, divorce and taking back (one’s wife).” Narrated by Abu Dawood, 2194; al-Tirmidhi, 1184; Ibn Maajah, 2039.
(source Islam Q&A)
He says in this matter although such words should not be used in joke but while making decision whole situation should be seen like if wife knows he is joking with her and no serious message delivered to wife then it counts nothing. Mere utterance of phrase of divorce should not be counted basis for making decision. In my view knowledge of man should also seen who uttered phrase. I just shared it. Allah knows the best.