Re: [DISCUSSION] ext/intl: single-value skeleton formatter (GH-24165)

From: Date: Thu, 08 Oct 2026 13:16:27 +0000
Subject: Re: [DISCUSSION] ext/intl: single-value skeleton formatter (GH-24165)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-132833@lists.php.net to get a copy of this message
Hi On 2026-10-06 20:39, David CARLIER wrote:
I would like to add a single-value counterpart, IntlNumberFormatter, built from a skeleton: echo IntlNumberFormatter::createFromSkeleton(
    'measure-unit/speed-kilometer-per-hour unit-width-full-name',
'fr')->format(5); It would cover units and the rest of what skeletons support, and it would only be available with a recent enough ICU.
It's unfortunate that we would then have both NumberFormatter and IntlNumberFormatter, but getting something on the non-legacy API and with a proper Intl prefix would be a good thing. I'm thus in favor. As future scope we should probably deprecate NumberFormatter then. Best regards Tim Düsterhus

« previous php.internals (#132833) next »