What does a null value in php mean?
Editor to share with you what the null value of php refers to. I hope you will get something after reading this article. Let's discuss it together.
Php null refers to the null data type, indicating that a variable does not have any value; null values are case-insensitive, that is, null is the same as NULL or Null.
This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer
What does a null value of php mean?
Php: null value (null) data type
Null value (null):
A null value, like its name, indicates that a variable does not have any value. Null values (null) are case-insensitive, meaning that null is the same as NULL or Null.
There are three situations in which null values are assigned in PHP:
The first kind:
Has not been assigned yet
The second kind:
Is assigned to NULL.
The third kind:
Variables processed by the unset () function
Example
The string string1 is assigned to null,string2 with no declaration and assignment at all, so output null, and the final string3, though given an initial value, becomes null after being processed by the unset () function. The function unset () removes variables from memory. The code is as follows:
The is_null function is used to determine whether the variable is null. As we will talk about later, this function returns a Boolean. If the variable is null, it returns true, otherwise it returns false. The unset () function is used to destroy known variables.
After reading this article, I believe you have a certain understanding of "what is the meaning of php null". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!