Home  >  Article  >  Backend Development  >  php data type NULL

php data type NULL

伊谢尔伦
伊谢尔伦Original
2016-11-24 13:54:061100browse

The special NULL value indicates that a variable has no value. The only possible value of type NULL is NULL.

A variable is considered NULL if:

is assigned a value of NULL.

has not been assigned a value yet.

is unset().

Syntax

The NULL type has only one value, which is the case-insensitive constant NULL.

<?php
$var = NULL;
?>

See is_null() and unset().

Convert to NULL

Using (unset) $var Converting a variable to null will not delete the variable or unset its value. Just returns NULL value.


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn