OpenEMR 5.0.2 is definitely compatible with PHP 7.2 and 7.3 (and should be 7.4 if using most recent patch)
OpenEMR 6.0.0 (previously 5.0.3) is compatible with PHP 7.3 and PHP 7.4. Also should be with PHP 8.0, although no promises since there are a couple issues with third party packages, which should work themselves out soon. And compatibility with 7.2 will be dependent on how much longer until we release 6.0.0 (since php 7.2 reaches end of life on 11/2020).