Commentary on the hadith, “The best of people are my generation, then those who come after them, then those who come after them. Then there will come people whose testimony will come before their oath, and their oath before their testimony”
Question

What is the meaning of this hadith: “The best of people are my generation, then those who come after them, then those who come after them. Then there will come people whose testimony will come before their oath, and their oath before their testimony”?
Praise be to Allah.Al-Bukhari (3651) and Muslim (2533) narrated from ‘Abdullah ibn Mas‘ud (may Allah be pleased with him) that the Prophet (blessings and peace of Allah be upon him) said: “The best of people are my generation, then those who come after them, then those who come after them. Then there will come people whose testimony will come before their oath, and their oath before their testimony.”
Ibrahim said: They used to punish us for giving false testimony and to make us fulfil our promise.
An-Nawawi (may Allah have mercy on him) said:
The correct view is that his generation were the Companions, the second generation were the Tabi‘in, and the third generation was those who came after them."(Sharh an-Nawawi ‘ala Muslim  16/85).
Please see the answer to question no. 219934 .
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said:
The words “the best of people” indicate that his generation were the best of people, so his Companions were better than the disciples who were the supporters of ‘Isa, and were better than the seventy leaders whom Musa (blessings and peace of Allah be upon him) chose.
This superiority is in general terms, referring to the generations, not in individual terms. It does not mean that there could not have been anyone among the generation who follows the Tabi‘in who was better than the generation of the Tabi‘in, or that there could not have been anyone among the generation of tje Tabi‘in who was more knowledgeable than some of the Companions. As for the virtue of having accompanied the Prophet (blessings and peace of Allah be upon him), no one could attain that other than the Companions, and no one could surpass them in that. However, with regard to knowledge and worship, there may be among those who came after the Companions some who had greater knowledge and did more acts of worship than some of them."(Majmu‘ Fatawa wa Rasa’il al-‘Uthaymin  10/1057-1058).
The words “Then there will come people” mean: after the first three generations.
Regarding the words, “whose testimony will come before their oath, and their oath before their testimony” al-Qari said:
It was said: This indicates that there will be a great deal of false testimony and false oaths. Sometimes they will swear oaths before giving testimony, and sometimes the other way round. Al-Mudhhir said: This may be understood as describing the haste with which they will give testimony and swear oaths, and that a man will be eager to do that and will hasten to do it, to the extent that he will not know with which of them to begin, and it will be as if his testimony precedes his oath and his oath precedes his testimony, because he will care so little about the teachings of religion.”"(Mirqat al-Mafatih 6/2444).
Ibn al-Jawzi (may Allah have mercy on him) said:
What is meant is that they will not be cautious or prudent in their speech, and they will take lightly the matter of giving testimony and swearing oaths."(Kashf al-Mushkil  1/291).
Al-Minnawi (may Allah have mercy on him) said:
Al-Baydawi said, as did al-Karmani: They are people who will be eager to swear oaths and they will swear oaths to support their testimony. Sometimes they will swear oaths before giving testimony, and sometimes the other way round."(Fayd al-Qadir 3/478).
Shaykh Ibn ‘Uthaymin said:
The words “whose testimony will come before their oath, and their oath before their testimony” may be understood in two ways:
1. That because there will be so little trust in them, they will not give testimony without swearing an oath, and sometimes the testimony will come first and sometimes the oath will come first.
2.. That it is a metaphor indicating that these people will not care about giving testimony or swearing oaths, to the extent that in their case, it will be as if the testimony and the oath are racing one another.
These two interpretations do not contradict one another; the hadith may be understood as referring to both of them.
The words “Then there will come people” indicate that not all the members of that generation will be like this, because the Prophet (blessings and peace of Allah be upon him) did not say, “Then the people will be…” The difference is clear."(Majmu‘ Fatawa wa Rasa’il al-‘Uthaymin  10/1057).
What the hadith means is that after the best generations, there will come some people whose testimony and oaths cannot be trusted, and lying will be widespread among them.
The words “Ibrahim said” refer to Ibrahim an-Nakha‘i, one of the jurists of the Tabi‘in.
Regarding the words “They used to punish us for giving false testimony,” Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said:
That is: They used to punish us for giving false testimony, or if we witnessed something and we did not give testimony concerning it. Or it may be that what is meant here is that they were punished for hastening to give testimony and make promises. This is how Ibn ‘Abd al-Barr interpreted it.
The words “make promises” mean: if they made a promise, they would strongly urge them to fulfil it.
The words “when we were children” indicate that they used to punish them when they were children, by way of discipline.
From the words of Ibrahim it may be understood that the testimony of a child may be accepted, because the words “when we were children” indicate that they had not yet reached puberty. This is a matter concerning which there is a difference of opinion among the scholars.
Some of them say that in order to give testimony, the person should be an adult (i.e., have reached puberty), and if he witnessed something when he was still a child, his testimony cannot be accepted until he has reached puberty.
Some of them said that the testimony of children concerning one another is acceptable, whether they are asked to witness something or to give their testimony of what they witnessed, because it is very rare for an adult to be among children.
Some of them said that the testimony of children concerning one another may be accepted if it is given immediately, because after they disperse there is a possibility that they may forget or be prompted, and there is no way to regard their testimony as invalid, otherwise the rights of children may be lost (in the event of a dispute among them).
From this report, it may be understood that it is permissible to smack children to make them behave, if they cannot be disciplined except by smacking them."(Majmu‘ Fatawa wa Rasa’il al-‘Uthaymin  10/1058-1059).
For more information, please see the answer to question no. 218999 .
And Allah knows best.