1if(empty($var1)){
2 echo 'This line is printed, because the $var1 is empty.';
3}
1function strictEmpty($var) {
2
3 // Delete this line if you want space(s) to count as not empty
4 $var = trim($var);
5
6 if(isset($var) === true && $var === '') {
7
8 // It's empty
9
10 }
11 else {
12
13 // It's not empty
14
15 }
16
17}