xref: /PHP-7.4/ext/intl/tests/bug80763.phpt (revision 84b61528)
1--TEST--
2Bug #80763 (msgfmt_format() does not accept DateTime references)
3--SKIPIF--
4<?php
5if (!extension_loaded('intl')) die('skip intl extension not available');
6?>
7--FILE--
8<?php
9$today = new DateTime('2021-02-17 12:00:00');
10$formatter = new \MessageFormatter('en_US', 'Today is {today, date, full}.');
11$params = ['today' => $today];
12array_walk($params, fn() => 1);
13var_dump($formatter->format($params));
14?>
15--EXPECT--
16string(38) "Today is Wednesday, February 17, 2021."
17