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