I had a plumber install a new water heater the other day, and he said it's up to 2018 (US) code, but I've been wondering if the T&P relief valve discharge pipe really is correct, because it seems to me like discharge pipes shouldn't flow upwards:
The hole in the wall that the discharge pipe goes out of is the one used by the original water heater's pipe, and I don't know why they made it so high - I'm guessing because there's not a lot of room in this corner of my garage and they needed the pipe to go above the water heater.
Illegal. Your photo shows a TPV outlet pipe with a trap. Last I checked, UPC 608.5 says "No part of such drain pipe shall be trapped ..."
Similarly, IPC (2012) 504.6 (8) Discharge piping serving a TPV shall "Not be trapped."
It's wrong!!! I've been a plumber over 20 years and this would not get approved. All licensed plumbers know this. They were too lazy to drill a hole thru the wall or something. Ideally it should have gone down to the pan. That would tell you that something Is wrong with the water heater. Like your pressure regulator in front of the house. Would you be able to see if there is water coming out from there? That T&P Valve is an important indicator if something is wrong with the water heater. And is there a Pressure relief tank installed? Some states require it after 2018.
Majority of water heater are located where the relief line has no option other than going up and then to outside wall where it drops to go outside at a safe height low off the ground. However this requires a drain by the water heater at the lowest point before rising up. The brass fitting in the picture has a plug that can be removed to drain the relief line after a discharge.