Way back in 2008 I ended up in the hospital in Bangkok. I got out and was resting up and only had 5 days left on my visa exempt stay in Thailand so decide to do a border run to Aranya Prathet-Poipet.
On trying to re-enter Thailand the immigration officer said I had stayed longer than 90 days in Thailand in the last 180 days so I would have to go to Phnom Penh and apply for a tourist visa. He said Cambodia would allow me to re-enter with the visa I had just used.
I really did not want to make the trip on buses from Poipet to Phnom Penh. I told the immigration officer I had 5 days left on my stay before leaving Thailand, showed him my hospital bill and basically begged him to let me back into Thailand. He gave me one day in Thailand. I got a bus back to Bangkok and was on a plane the following day to Kuala Lumpur so never found out if Cambodia would have allowed me to re-enter on my used visa.