Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Problems with variable types in PHP
Problems with variable types in PHP

PHP supports 8 primitive data types.

Four scalar types:

boolean (Boolean) false and true

Only two values ??

integer (integer )

That is, non-decimal number

float (floating point type, also called double (the value range is smaller than float))

Decimal number

string (string)

Two composite types:

array (array)

object (object)

Finally There are two special types:

resource (resource)

NULL (no type)

In order to ensure the readability of the code, this manual also introduces some Pseudo-type:

mixed (mixed type)

number (numeric type)

callback (callback type)

More detailed description LZ can be searched on Baidu: PHP data types will be introduced in detail