Busr bin Sa'id (may Allah have mercy on him) narrates that Zayd bin Khalid al-Juhani (may Allah be pleased with him) sent him to Abu Juhaym (may Allah be pleased with him) to find out what he had heard from the Messenger of Allah (peace and blessings be upon him) about one who passes in front of a person praying. Abu Juhaym (may Allah be pleased with him) replied that the Messenger of Allah (peace and blessings be upon him) said: "If the one who passes in front of a person praying knew how much sin he would incur by doing so, he would prefer standing for forty over passing in front of the one praying." Abu al-Nadr (may Allah have mercy on him) said: I do not know whether he mentioned forty days, forty months or forty years.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3452