NULL

The null type is PHP's unit type, i.e. it has only one value: null.

Undefined, and unset() variables will resolve to the value null.

Syntax

There is only one value of type null, and that is the case-insensitive constant null.

<?php
$var
= NULL;
?>

Casting to null

Увага

Цей функціонал ЗАСТАРІВ, починаючи з PHP 7.2.0, та ВИЛУЧЕНИЙ в PHP 8.0.0. Вкрай не рекомендується на нього покладатися.

Casting a variable to null using (unset) $var will not remove the variable or unset its value. It will only return a null value.

Прогляньте також