High Dynamic Range Imaging
From Wikicliki
High Dynamic Range Imaging (HDRI or just HDR) - uses tone-mapping techniques with multiple exposures combined in order to capture high-contrast scenes that are hard or impossible to photograph in a single exposure.
That's what your iphone is doing.