You are here: Home / Topics / Explain NULL in PHP

Explain NULL in PHP

Filed under: PHP on 2022-10-31 21:28:10

In PHP, the special data type NULL is used to indicate the presence of solely the NULL value. It cannot have any other value assigned to it.

PHP allows for the declaration of NULL in one of two ways, as illustrated below:

$var = NULL:


$var = null;

In PHP, the two aforementioned syntaxes function correctly.

About Author:
Pritvik     View Profile
Hi, I am using MCQ Buddy. I love to share content on this website.