The constructor performs Level 1 and Level 2 canonicalization according to ICU standards. See http://userguide.icu-project.org/locale#TOC-Canonicalization.
This means all of these (and others) local format work:
'pt', 'pt-PT', 'pt-PT', 'pt_PT.utf8', 'pt_PT.utf8'
https://github.com/php/php-src/issues/11942