When proof of onward travel is required, it is always the job of an airline to check whether your documentation is in place. If not, and if you have to be deported, I believe in this situation the airline has to bear the cost of flying you back; this is standard practice around the world.
Malaysia implements these requirements pretty unevenly. Citizens of countries which do not require a visa in advance (like Iran) may or may not be checked strictly, the real requirement for onward travel in case of transit is for those who require visas / transit visas (Indians, Chinese, …)
The simplest thing is to show you will be leaving the country, and for that I don’t think an airline ticket is required. Get a cheap bus ticket with Malaysia’s national bus operator Transnasional – from Kuala Lumpur (listed under ‘Wilayah Persekutuan’) to Singapore costs only roughly $15 – a cheap price to pay just to tick a box if you’re stopped at all.
Alternatively, buy a ticket from anywhere in Malaysia to Singapore with a low-cost airline like Tiger Airways or Air Asia. Don’t pay more than $20-40 including taxes for it. The tickets are non-refundable but compared to cancellation charges of full-service airlines with refundable tickets are usually much higher.
Credit:stackoverflow.com‘