Use of max int in array_sum
[2013-07-21 09:37 UTC] koushky at gmail dot com
Description: ------------ If we add amount of max INT with number 1 in array_sum function , the result will be false. While if we add this two via plus (+) operator ,the result will be true. My operation system is 64 bit. Test script: --------------- /* max INT in 64bit = 9223372036854775807 */ var_dump(array_sum(array(9223372036854775807,1))); var_dump(9223372036854775807+1); Expected result: ---------------- int(-9223372036854775808) float(9.2233720368548E+18) Actual result: -------------- float(9.2233720368548E+18) float(9.2233720368548E+18)
[2013-07-21 09:47 UTC] koushky at gmail dot com
[2013-07-21 12:12 UTC] laruence@php.net
[2013-10-31 09:12 UTC] thuhc at yahoo dot com
[2013-12-10 10:05 UTC] thuhc at yahoo dot com
[2015-05-25 01:27 UTC] bugs at tmarques dot com