Explanation of integer variables of PHP Data types

Source: Internet
Author: User
Abstract: integer is Interger. in 32-bit operating systems, the valid range is-2146483648 ~ + 2146483646... integer: Interger. in 32-bit operating systems, the valid range is-2146483648 ~ + 2146483646. The integer value can be specified in decimal, hexadecimal, or octal format. you can also add an optional symbol "-" or "+" to mark positive and negative values. If the octal symbol is used, 0 must be added before the number. hexadecimal notation is used, and 0x must be added before the number, as shown in program 2-5.


$ A = 123; # decimal
$ B =-456; # A negative number
$ C = 0135; # octal number (equal to 93 in decimal format)
$ D = 0x1b; # hexadecimal number (equal to decimal 27)
Echo $ ."
". $ B ."
". $ C ."
". $ D;
?>

The above is the explanation of integer variables of the PHP Data type. For more information, see PHP Chinese network (www.php1.cn )!

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.