A man has successfully cooked a pork roast in a car on a scorching hot day in Australia.

Stu Pengelly placed the slab of pork in a baking tin on the car seat of his red Datsun Sunny in Perth, Western Australia, for around 10 hours.

"It worked a treat!" he said in a Facebook post with pictures of the cooked meat cut into slices to demonstrate its doneness.

Pengelly also gave the temperature as it increased throughout the day, culminating in a "staggering 81 degrees Celsius inside temperature" (177.8 degrees Fahrenheit) at 1 p.m.

Other social media users responded to the post with humorous comments, asking for an invite to the next roast, and relating their own experiences cooking in a heatwave.

But Pengelly's post also contained some serious advice, warning people not to leave their children or dogs in a vehicle in the heat.

"Do not leave anyone or anything precious to you in a hot car, not for a minute," he wrote.

Perth has recorded 10 days this month when temperatures soared above 35 degrees Celsius, according to Australia's meteorology bureau.

When reached for comment, Pengelly said he next wants to try cooking roast beef in the Datsun.

"A quiche would cook in 2 hours, I reckon," he said.