xref: /php-src/Zend/tests/bug54547.phpt (revision f39b5c4c)
1--TEST--
2Bug #54547: wrong equality of string numbers near LONG_MAX with 64-bit longs
3--SKIPIF--
4<?php
5if (PHP_INT_MAX !== 9223372036854775807)
6    die("skip for 64-bit long systems only");
7?>
8--FILE--
9<?php
10var_dump("9223372036854775807" == "9223372036854775808");
11var_dump("-9223372036854775808" == "-9223372036854775809");
12var_dump("0x7fffffffffffffff" == "9223372036854775808");
13
14/* not exactly what the bug is about, but closely related problem: */
15var_dump("999223372036854775807"=="999223372036854775808");
16var_dump("899223372036854775807">"00999223372036854775807");
17?>
18--EXPECT--
19bool(false)
20bool(false)
21bool(false)
22bool(false)
23bool(false)
24