Ibrahim (may Allah have mercy on him) narrates from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) concerning saying "forbidden": if his intention was an oath, he should give the expiation of an oath; and if his intention was divorce, divorce will take place. The intention will be taken into account.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 15061