It was narrated from Maimunah bint Sa`d, the freed slave woman of the Prophet (ﷺ) that :
the Messenger of Allah (ﷺ) was asked about illegitimate children. He said: "Two sandals in which I wage Jihad are better than freeing an illegitimate child."
English reference: Vol. 3, Book 19, Hadith 2531
Arabic reference: Book 19, Hadith 2628
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.