xref: /PHP-8.1/ext/intl/tests/bug81019.phpt (revision 6600ad60)
1--TEST--
2Bug #81019: Unable to clone NumberFormatter after failed parse()
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7
8$fmt = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
9$fmt->parse('abc');
10$fmt2 = clone $fmt;
11
12$datefmt = new IntlDateFormatter('en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL);
13$datefmt->parse('abc');
14$datefmt2 = clone $datefmt;
15
16$msgfmt = new MessageFormatter('en_US', '{0,number,integer}');
17$msgfmt->parse('abc');
18$msgfmt2 = clone $msgfmt;
19
20?>
21===DONE===
22--EXPECT--
23===DONE===
24