Paying to use the toilet is a pretty foreign concept in Australia.

There are parts of France, Germany, Singapore and Turkey, just to name a few, where the practice is commonplace.

So when McDonald's customers on Queensland's Sunshine Coast learned they could only access the bathroom through a code given out once they've ordered, it was met with a mixed response.

A photo of a sign outside the door leading to the men's, women's, and disability toilets at the Maroochydore restaurant sparked fierce discussion on social media this week.

It read:

"Toilets proudly provided for the use of McDonald's customers. Code on bottom of receipt."

Kim McDonald, who shared the photo, had stopped into the store on Thursday for lunch with her family.

She said they had planned to buy food, but before that her 90-year-old grandmother had to use the bathroom, only to realise they would have to line up and order first.

Ms McDonald said she thought the lock was overkill.

It can be quite common in other parts of the world to pay to use bathrooms. ( Flickr: Emma Forsberg )

"While we were there I had to help two other elderly people just to figure out they needed a code to get in the door," she said.

"They were just standing there, trying to open the door and couldn't figure out why it wasn't opening.

"You can't even get to the disabled toilet without entering the code."

Loading

Ms McDonald said she understood the need for McDonald's to restrict bathrooms use to just its customers.

"But most people go to Maccas after long trips and they want to go to the toilet before they eat, so it's a bit inconvenient having to order before you can even go," she said.

"If you're with kids and they're hanging off the side of you and want to go to the toilet, you have to go order and get your receipt before they can go.

"I can understand the whole concept … but really, how many people go into Maccas for just the toilet? You're going in there to buy McDonald's, not going in there to just hang out."

A McDonald's spokeswoman previously told ABC News it is not their policy to lock bathroom doors.

"The local licensee has made this decision, however, they are able to be opened for anyone who requires them," the spokeswoman said.

Store owner Gary Binet said a security issue involving a syringe led to the change in policy.

"We have had some security issues over the years and decided to take this step about six months ago," Mr Binet said.

"The toilets are not visible from the front counter area and there is an entrance (and fire escape) at that end of the building, that is also out of view for our shift managers.

"The lock has helped with the issue and we have not had an incident since installation."

'In Finland it costs 1 euro to use the loo'

The image sparked debate on social media.

There were those for it:

"No problems with it. My local coffee shop has a similar message." Melissa Kerwin

"Great idea! We came across this at Sunshine Coast. I prefer to use McDonald's toilets than a public park one. We just brought 2 ice creams to get the code and the door was unlocked anyways." Linda Treloar

"They aren't serviced by taxpayer money. What's the problem? McDonald's pay their workers to clean the facilities." Samuel Deacon

Those against it:

"I don't agree with this at all. Mainly because most McDonalds on main highways are 24hrs. If you need to make a stop in the middle of the night you do it at Maccas. One because they are open and two they are lit up brightly and there's generally people around. Not like council public toilets that are generally locked overnight and are dark and scary." Amanda Westerberg

"That's terrible, I have a disability and there are many times where I've had no choice but to use fast food restaurant toilets because of the lack of public ones." Glenn Astridge

Some pointed out it's already happening elsewhere in Australia and around the world:

"In one of our five Ballarat Macca's stores they require you to go to the front counter and ask for the door to be unlock and they buzz you in." Ken Keller

"They had this in Paris 10 years ago. Just buy a 50c ice cream or $1 frozen coke or box of cookies. At least their toilets are generally reasonably clean. I'd rather buy a super cheap product and have a clean toilet to use than buy nothing and have to use a dirty one in a public park or servo." Nat Kemp

"In Finland it costs 1 euro to use the loo. Everyone keeps a couple of metal washers in their pockets for times of need." Mc Dave

In the meantime, if you find yourself in need of a loo and you don't want to fork out for a 50-cent ice cream cone, download the National Public Toilet Map app on your phone to find the nearest public toilet available to you.