Ok so maybe this is a stupid question. But if i have two inverters that are the exact same, wouldn't it be possible to wire them to produce 240 in a panel? Basically have 1 inverter run 1 leg and the other inverter on the other leg?
Yes, this would work but only when connected to an active grid with a grid-tie inverter. A single phase 120VAC grid-tied inverter synchronizes to the utility phase then ups the voltage some to provide the amperage to provide power to the house over the utility and if there is surplus, back-feed the utility. If the inverter supports a current transformer (CT) tap on the utility line it could stop itself to ensure there is zero feed back to the utility, thus avoiding Net Metering.
So on grid or grid-tied, you can have multiple non-communicating 120VAC or 240VAC grid-tie inverters on the same legs. By design they all first read the existing utility phase, then they synchronize to it.
In off-grid, it fails when you try to use two non-communicating 120VAC Inverters to create 240VAC because their output phases have to be 180 degrees out of phase. Without the inverters communicating to synchronize a 180-phase shift, one Inverter would not know what the phase is of the other inverter. At the load, measuring across L1 and L2 you would see a constant voltage anywhere between zero to 240 VAC depending on what the phase shift was between the two inverters. Add in a slight drift in the 60 HZ clock and the voltage across L1 and L2 would very slowly change from zero to 240VAC and back because the two inverters don't know the other exists.
In off-grid, a similar problem would arise if you tried to parallel two non-communicating inverters on the same 120 VAC leg. One would not know the phase status of the other. In this case, unless the phases just happened to be synchronized, you would be guaranteed to have a short.
So off-grid, two or more inverters must be designed to communicate on their phase status and be programmed with a phase shift with one being a master. Either a zero-phase shift to parallel two or more 120VAC inverters on the same 120VAC leg, or a 180-degree phase shift to achieve 240VAC between two separate 120VAC legs.