In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about what scalar data types are in php. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The data types of PHP can be divided into three categories: scalar data types, compound data types and special data types.
Among them, the scalar data type is the most basic unit of the data structure, which can only store one data. There are four types of scalar data in PHP, as shown in the following table:
Type function
Boolean (Boolean) the simplest data type with only two values: true (true) / false (false)
A string (string) string is a continuous sequence of characters
Integer (integer) integers contain all integers, either positive or negative
Float is also used to represent numbers, unlike integers, it can also be used to represent decimals and exponents in addition to integers.
1. Boolean (boolean)
Boolean is one of the most commonly used data types in PHP, which holds a true value or false value, where true and false are the internal keywords of php. To set a Boolean variable, simply assign true or false to the variable. In php, not only Boolean values are false, but also non-Boolean values are considered to be false in some special cases. For example, 0, an empty string and only an array that declares no assignment.
2. Character string (string)
A string is a continuous sequence of strings consisting of numbers, letters, and symbols. Each character in the string takes up only one byte. There are three ways to define a string, single quotation marks, double quotation marks, and delimiters
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.