1
2<?php
3/**
4* @author : Nanhe Kumar <nanhe.kumar@gmail.com>
5* List of all empty values
6**/
7
8$testCase = array(
9 1 => '',
10 2 => "",
11 3 => null,
12 4 => array(),
13 5 => FALSE,
14 6 => NULL,
15 7=>'0',
16 8=>0,
17
18);
19
20foreach ($testCase as $k => $v) {
21 if (empty($v)) {
22 echo "<br> $k=>$v is empty";
23 }
24}
25/**
26Output
271=> is empty
282=> is empty
293=> is empty
304=>Array is empty
315=> is empty
326=> is empty
337=>0 is empty
348=>0 is empty
35**/
36?>
37
38