Maximum number of numeric keys in the php Array

Source: Internet
Author: User
{Code ...}
Php// 18614004082 indicates the mobile phone number $ arr [18614004082] = 9; var_dump ($ arr); // 1434134898 => 9

Reply content:
Php// 18614004082 indicates the mobile phone number $ arr [18614004082] = 9; var_dump ($ arr); // 1434134898 => 9

YesIntegerInteger Range. The maximum value isPHP_INT_MAXConstant Value. You have no problems with this value. Your output seems to be a timestamp. Let's see what went wrong with the program ~

Http://3v4l.org/k15Wq

Array (1 ){
[507887842] =>
Int (8)
}
The above is the output result. The 13392789730 I defined is used as the subscript of the array. It is estimated that it is beyond the defined range of the php array.

The maximum value of the signed int Is 2147483647. In the above Code, 1 is automatically converted to float. If it exceeds the limit, it is expressed in scientific notation. PHP also handles large numbers.

View in php. ini

The key can be of the string type. If the key is out of the int range

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.