The difference between isset and empty_PHP tutorial

WBOY
Release: 2016-07-21 15:57:37
Original
1008 people have browsed it

isset($var); //If it is false, it is not defined. If it is not defined, it is false
$var = '';
isset($var); //If it is true, it is true if it is defined
empty($var) ; //If true, return true if the value is empty
$var = '111';
empty($var); //If false, return false if it is not empty

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/317830.htmlTechArticleisset($var);//It is false and is not defined. It is not defined and it is false. $var=''; isset( $var);//For true, it is defined to be true empty($var);//If the true value is empty, it will return true. $var='111'; empty($var);//If it is false, it will not be empty. ..
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!