Open
Description
Description
The following code:
<?PHP
function nth(int $number) : ?string {
$formatter = new \NumberFormatter('en_US', \NumberFormatter::ORDINAL);
$formatted = $formatter->format($number);
return $formatted === false ? null : $formatted;
}
echo nth(651959195189);
?>
Resulted in this output:
651,959,195,189rd
But I expected this output instead:
651,959,195,189th
PHP Version
PHP 8.3.6
Operating System
Linux Mint 22