|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-02-05 17:34 UTC] cataphract@php.net
-Status: Open
+Status: Verified
[2011-02-05 18:55 UTC] cataphract@php.net
[2012-08-09 14:05 UTC] ajf at ajf dot me
[2014-06-05 14:37 UTC] ajf at ajf dot me
[2014-06-05 15:12 UTC] ajf at ajf dot me
[2015-12-19 23:27 UTC] ajf at ajf dot me
[2018-05-29 11:41 UTC] cmb@php.net
[2018-05-29 12:16 UTC] spam2 at rhsoft dot net
[2018-05-29 12:18 UTC] spam2 at rhsoft dot net
[2018-05-29 12:20 UTC] ajf@php.net
-Status: Verified
+Status: Not a bug
[2018-05-29 12:20 UTC] ajf@php.net
[2018-05-29 12:30 UTC] spam2 at rhsoft dot net
[2018-05-29 12:52 UTC] spam2 at rhsoft dot net
[2018-05-29 12:53 UTC] ajf@php.net
[2018-05-29 12:53 UTC] nikic@php.net
[2018-05-29 13:07 UTC] cmb@php.net
-Status: Not a bug
+Status: Re-Opened
-Assigned To:
+Assigned To: cmb
[2018-05-29 13:07 UTC] cmb@php.net
[2018-05-29 13:07 UTC] cmb@php.net
-Type: Bug
+Type: Documentation Problem
[2018-05-29 13:41 UTC] cmb@php.net
[2018-05-29 13:41 UTC] cmb@php.net
-Status: Re-Opened
+Status: Closed
[2018-05-29 13:41 UTC] cmb@php.net
[2020-02-07 06:05 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 13:00:01 2025 UTC |
Description: ------------ I found this and seems a bug. Everytime I use the negative PHP_INT_MAX literally (-9223372036854775808) as a function parameter, it is converted to float. However, if I pass it like an expression -9223372036854775807 - 1, it is correctly identified as an integer. Test script: --------------- --TEST-- Checks if the negative PHP_INT_MAX is treated as integer. --CREDITS-- Eriksen Costa <eriksen.costa@infranology.com.br> --SKIPIF-- <?php if (PHP_INT_SIZE < 8) die('64bit platforms only'); ?> --FILE-- <?php var_dump(-9223372036854775807 - 1); var_dump((PHP_INT_MAX * -1) - 1); var_dump(-9223372036854775808); ?> --EXPECT-- int(-9223372036854775808); int(-9223372036854775808); int(-9223372036854775808); Expected result: ---------------- int(-9223372036854775808); int(-9223372036854775808); int(-9223372036854775808); Actual result: -------------- int(-9223372036854775808) int(-9223372036854775808) float(-9.2233720368548E+18)