xref: /PHP-7.3/ext/intl/tests/bug79212.phpt (revision b93e4aa1)
1--TEST--
2Bug #79212 (NumberFormatter::format() may detect wrong type)
3--SKIPIF--
4<?php
5if (!extension_loaded('intl')) die('skip intl extension not available');
6if (!extension_loaded('gmp')) die('skip gmp extension not available');
7?>
8--FILE--
9<?php
10$fmt = new NumberFormatter('en_US', NumberFormatter::PATTERN_DECIMAL);
11var_dump($fmt->format(gmp_init('823749273428379492374')));
12
13$fmt = new NumberFormatter('en_US', NumberFormatter::PATTERN_DECIMAL);
14var_dump($fmt->format([1], NumberFormatter::TYPE_INT64));
15?>
16--EXPECTF--
17string(21) "823749273428379%c%c%c%c%c%c"
18string(1) "1"
19