Commit:    5cbf2d678505b6e4ab89bcfe04695e5da9dd2c0e
Author:    Stanislav Malyshev <s...@php.net>         Thu, 19 Apr 2012 11:05:17 
-0700
Parents:   c06ec6bde43a114af3bd84e986827839de1b1e4b 
2827324c7cc4f3a28ad66cd2a3724165abac4941
Branches:  PHP-5.3

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=5cbf2d678505b6e4ab89bcfe04695e5da9dd2c0e

Log:
Merge branch 'pull-request/61' into PHP-5.3

* pull-request/61:
  Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer

Bugs:
https://bugs.php.net/59597

Changed paths:
  AA  ext/intl/tests/bug59597_32.phpt
  AA  ext/intl/tests/bug59597_64.phpt


Diff:
diff --cc ext/intl/tests/bug59597_32.phpt
index 0000000,0000000..928a235
new file mode 100644
--- /dev/null
+++ b/ext/intl/tests/bug59597_32.phpt
@@@ -1,0 -1,0 +1,21 @@@
++--TEST--
++Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
++--SKIPIF--
++<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
++<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
++--FILE--
++<?php
++
++$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
++$value = $formatter->parse('2147483647', \NumberFormatter::TYPE_INT32);
++var_dump($value);
++
++$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
++$value = $formatter->parse('2147483650', \NumberFormatter::TYPE_INT64);
++var_dump($value);
++
++?>
++--EXPECT--
++int(2147483647)
++float(2147483650)
++
diff --cc ext/intl/tests/bug59597_64.phpt
index 0000000,0000000..4b96bf7
new file mode 100644
--- /dev/null
+++ b/ext/intl/tests/bug59597_64.phpt
@@@ -1,0 -1,0 +1,21 @@@
++--TEST--
++Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
++--SKIPIF--
++<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
++<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
++--FILE--
++<?php
++
++$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
++$value = $formatter->parse('2147483647', \NumberFormatter::TYPE_INT32);
++var_dump($value);
++
++$formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
++$value = $formatter->parse('2147483650', \NumberFormatter::TYPE_INT64);
++var_dump($value);
++
++?>
++--EXPECTREGEX--
++int(2147483647)
++int(2147483650)
++


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to