This is_null() function is an inbuilt function in PHP which is used to find whether a variable is NULL or not. It returns True if the given variable is null, otherwise return False.
bool is_null( $var )
$x === null
It is an identical comparison operator and it returns true if the value of $x is equal to NULL. Null is a special data type in PHP which can have only one value that is NULL. A variable of data type NULL is a variable that has no value assigned to it. Any variable can be empty by setting the value NULL to the variable.
$var === null
- Ternary operator vs Null coalescing operator in PHP
- PHP 5 vs PHP 7
- PHP | Get PHP configuration information using phpinfo()
- PHP | php.ini File Configuration
- How to import config.php file in a PHP script ?
- LAMP installation and important PHP configurations on Ubuntu
- PHP | imagecreatetruecolor() Function
- Maximum execution time taken by a PHP Script
- PHP program to fetch data from localhost server database using XAMPP
- PHP | ImagickDraw getTextAlignment() Function
- PHP | Ds\Sequence last() Function
- PHP | Imagick floodFillPaintImage() Function
- Function to escape regex patterns before applied in PHP
- PHP | array_udiff_uassoc() Function
- PHP | Different characters in the given string
- PHP | geoip_continent_code_by_name() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.