Closed jimbo2150 closed 7 months ago
At first glance, PHP does nothing wrong nor fancy, it is hitting this code path :
if(timeStyle != UDAT_PATTERN) {
if(locale == 0) {
fmt = DateFormat::createDateTimeInstance((DateFormat::EStyle)dateStyle,
(DateFormat::EStyle)timeStyle);
}
else {
**fmt = DateFormat::createDateTimeInstance((DateFormat::EStyle)dateStyle,
(DateFormat::EStyle)timeStyle,
Locale(locale));**
}
}
where it gets a null pointer with the aforementioned locale. I ll see what the icu4c folks are going to say, keep you posted.
Is ar_AE@numbers=arab not ar_AE@numbers=arabic. Numberformat https://unicode-org.github.io/icu/userguide/locale/
@hormus You are correct. I saw it written that way on another site. Thank you.
Thanks @hormus I also thought it was arabic... good to know !
Description
The following code:
Resulted in this output:
But I expected this output instead:
If I use other numbering systems, it works without error:
3V4L also showing the error in all supported PHP versions: https://3v4l.org/JPFB9
PHP Version
PHP 8.2.15
Operating System
OpenSUSE Tumbleweed