Integer type and conversion of php

Source: Internet
Author: User
: This article mainly introduces the integer type and conversion of php. if you are interested in the PHP Tutorial, refer to it. Js data types: string, number, Boolean, array, Object, Null, Undefined

Php data type

Basic type (scalar type ):

Integer: int integer

Floating point: float double

String: string

Boolean type: bool boolean

Composite type:

Array: array

Object: Object

Special type

Null: null. only one data type exists, which is null.

Resource Type: resource

Integer type:

Bin: Binary

Oct: Octal

Dec: 10 hexadecimal

Hex: Hexadecimal

There are only two hexadecimal conversions: 10 to the other, and 10 to the other.

10 to others, which is a numeric type and converted to a string type.

Convert the string type to numeric type.

When the numeric value (, hexadecimal) is not of the string type, it can be compared with the 0-hexadecimal type.

The conversion rules take 10 to 2 as an example:

$ Dec = 10;

$ Bin = decbin ($ dec );

The above describes the integer type and conversion of php, including the object content, hope to be helpful to friends who are interested in the PHP Tutorial.

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.