[php-src] Issue #7779: Intl Extension: MessageFormatter prepends date with space

From: Date: Wed, 15 Dec 2021 08:59:37 +0000
Subject: [php-src] Issue #7779: Intl Extension: MessageFormatter prepends date with space
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238425@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7779 Author: frederikbosch ### Description The following code: ```php <?php $formatter = new \MessageFormatter('en_US', '{0, date, YYYY-ww}'); var_dump($formatter->format([new \DateTimeImmutable])); $formatter = new \MessageFormatter('en_US', '{0}'); var_dump($formatter->format(['test'])); ``` Resulted in this output: ``` string(8) " 2021-51" string(4) "test" ``` But I expected this output instead: ``` string(8) "2021-51" string(4) "test" ``` ### PHP Version 7.3.13 - 7.3.33, 7.4.0 - 7.4.27, 8.0.0 - 8.0.13, 8.1.0 ### Operating System Any

« previous php.bugs (#238425) next »