Top Ad unit 728 × 90

ticker

NULL in PHP

NULL

NULL is a special type that only has one value: NULL. To give a variable the NULL value, simply assign it like this:


$my_var = NULL;

The special constant NULL is capitalized by convention, but actually it is case insensitive; you could just as well have typed:


$my_var = null;

A variable that has been assigned NULL has the following properties:

  • It evaluates to FALSE in a Boolean context.
  • It returns FALSE when tested with IsSet() function.
NULL in PHP Reviewed by Rajat Jha on 19:41:00 Rating: 5

No comments:

All Rights Reserved by INFO PHP 99 © 2014 - 2015
Powered by Blogger, Designed by Sweetheme

Contact Form

Name

Email *

Message *

Powered by Blogger.