See the differences between phpis_null, empty, and isset in one table. is_nullisset_PHP tutorial.

Source: Internet
Author: User
The difference between phpis_null, empty, and isset is clarified in one table. is_nullisset. One table is used to identify the differences between phpis_null, empty, and isset, is_nullissetisset determines whether the variable already exists empty determines whether the variable is NULL or 0is_null determines whether the variable is NULL. a table lists the differences between php is_null, empty, and isset. is_nullisset

Isset determines whether a variable already exists

Empty determines whether the variable is null or 0

Is_null determines whether the variable is NULL

Variable Empty Is_null Isset
$ A = "" True False True
$ A = null True True False
Var $ True True False
$ A = array () True False True
$ A = false True False True
$ A = 15 False False True
$ A = 1 False False True
$ A = 0 True False True
$ A = "0" True False True
$ A = "true" False False True
$ A = "false" False False True

Is_null, empty, and isset are different. is_nullisset isset determines whether the variable already exists empty and whether the variable is NULL or 0 is_null. Whether the variable is NULL...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.