PYTHON NULL

is this article helpful?
|
Python replacement for PHP's NULL [ edit | history ]
var = None # its type is "NoneType"

PHP NULL

PHP original manual for NULL [ show | php.net ]

NULL

The special NULL value represents a variable with no value. NULL is the only possible value of type NULL.

Note: The null type was introduced in PHP 4.

A variable is considered to be null if:

  • it has been assigned the constant NULL.

  • it has not been set to any value yet.

  • it has been unset().

Syntax

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

<?php
$var 
NULL;       
?>

See also the functions is_null() and unset().

Casting to NULL

Casting a variable to null will remove the variable and unset its value.