summaryrefslogtreecommitdiff
path: root/Zend/tests/bug62097.phpt
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2012-05-22 12:36:28 +0200
committerStanislav Malyshev <stas@php.net>2012-05-23 18:55:36 -0500
commitacd711685a592c52be200e248154283c6c49c9f8 (patch)
tree9930dd583451b3d754db0cc16980ff20a5f1bcf4 /Zend/tests/bug62097.phpt
parent0838a2b7c559442aac4692a023d044f34c60d24f (diff)
downloadphp-git-acd711685a592c52be200e248154283c6c49c9f8.tar.gz
Fixed bug #62097
This fixes the fix for bug #54547 in 32-bit machines by accepting float comparisons in 32-bit machines as long as the integer is not larger than the mantissa.
Diffstat (limited to 'Zend/tests/bug62097.phpt')
-rw-r--r--Zend/tests/bug62097.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/bug62097.phpt b/Zend/tests/bug62097.phpt
new file mode 100644
index 0000000000..bee72e7a23
--- /dev/null
+++ b/Zend/tests/bug62097.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #62097: fix for bug #54547 is wrong for 32-bit machines
+--SKIPIF--
+<php
+if (PHP_INT_MAX !== 2147483647)
+ die('skip for system with 32-bit wide longs only');
+--FILE--
+<?php
+var_dump("02147483647" == "2147483647",
+ "02147483648" == "2147483648",
+ "09007199254740991" == "9007199254740991",
+ "09007199254740992" == "9007199254740992");
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(false)