1. Boolean values are FALSE and TRUE.
Generally speaking, the values of Boolean are FALSE and TRUE, but when an operator, function, or procedure control requires a Boolean parameter, any type of value can be automatically converted to Boolean. The following values are considered FALSE, other values are considered TRUE.
2. Integer
Decimal: $int = 123;
Binary: $int = 0b123 (0b is added in front of the number);
Octal: $int = 0123 (0 is added in front of the number);
Hexadecimal: $int = 0x123 (0x is added in front of the number);
3. Float type (float, also called double, Both names exist at the same time )
Usually used to represent data that cannot be represented by integers, such as money values, distance values, speed values, etc.
4. String
There are three types: single quoted strings, double quoted strings and delimiters.
The above are the four scalar types in php. I hope it will be helpful to everyone.