In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you "what does string mean in PHP", which is easy to understand and clear, hoping to help you solve your doubts? let me lead you to study and learn this article "what does string mean in PHP?"
In PHP, string means "string" or "character variable", and a string means a string of characters, including a mixture of Chinese, English, special symbols and numbers.
This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer
What does string mean in PHP?
String is a "string" or a "character variable"
It often appears in php manuals, for example:
String $k
The string variable $k, which is required to be a string
The simple meaning of a string is: "A string of characters, including Chinese, English, special symbols, and a mixture of numbers, is called a string."
For example:
$aaaaa11145 g / g / string / I am also a string / although I am a date, I have been put into a string in php, but my brother's timestamp is an integer.
These are all strings.
-
If you see int $k
The integer $k is required to be a number with no decimal point (it can only be a number, but whether it is positive or negative)
For example:
$a million 100, yes, yes, 100.
These are integers.
-
Since there are integers, there must be numbers with small dots. In programming languages (including php), it is called "floating point" floor.
Floor $k
$k is required to be floating-point
These are floating-point types:
$apropos 0.5 / b / 10.5 / b / s / cm / m / m / s / s
-
Array variable: array $k
The requirement is an array, which is automatically generated by functions and defined by ourselves.
Custom function method: array (), you can check it in the manual
I won't say much here. You can take a look at the manual. Arrays have two concepts:
Key name (equivalent to a sequence number in an array, either a number or a string)
Value (equivalent to the specific data corresponding to the variable, can be any data or array, such an array we call two-dimensional array, ha ha ran away, you go to see the manual, if you need to ask, I can talk about it in more detail. of course you can choose to contact me. )
Boolean Boolean
For programming languages, if they need to make judgments, they only know true (true) and false (false), 1 and 0, that is, simple judgments that are true and not valid.
There are only two Boolean: true true and false false.
For example, if I say 1 is greater than 5, the computer will calculate it. If it is not greater than 1, it will return false, otherwise it will return true. We use the returned true or false to proceed to the next step.
-
Empty (NULL) and''"" (the difference between empty strings)
Many people think that the two are the same, but in fact they are different.
In the database, it is obvious that the empty string does not exist; the empty string is just that we think there is nothing in it, but in fact the computer thinks it exists.
For example, two people (J and K) apply for a company together, and the company asks for K and signs a contract; at the same time, say to J, I'm sorry I don't have your position, I'll let you know next time.
The K who signed the contract hasn't got the money yet. You can use k as an empty string.
And J is only a verbal promise from this company. If there is no contract, you can understand it as NULL.
The following data is considered a Boolean false in php:
1. False, including strings
2, 0, empty (NULL, regardless of case), empty array (there are arrays but no elements, as if a shell company has no employees), floating point "0.0"
The above is all the content of this article "what does string mean in PHP?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.