xref: /PHP-8.3/ext/intl/tests/bug59597_64.phpt (revision 74859783)
1--TEST--
2Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
3--EXTENSIONS--
4intl
5--SKIPIF--
6<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
7--FILE--
8<?php
9
10$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
11$value = $formatter->parse('2147483647', \NumberFormatter::TYPE_INT32);
12var_dump($value);
13
14$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
15$value = $formatter->parse('2147483650', \NumberFormatter::TYPE_INT64);
16var_dump($value);
17
18?>
19--EXPECT--
20int(2147483647)
21int(2147483650)
22