Function : is_empty

This function tests if a value is empty. This can be an array or trimmed string. By trimming strings before testing, it acts as a proof against empty spaces. The function is also capable of regarding non-empty values as empty values. Examples are shown below:

Syntax
  is_empty($testval, $includes)

  
  $testval: value to be tested
  $includes: values to be regarded as empty values
   
                  
Sample 1
  vdump(is_empty('10')); //false
                  
The value above is not empty value, hence, false is returned
Sample 2
  vdump(is_empty('')); //true
                  
The string value above is empty, hence, true is returned
Sample 3
  vdump(is_empty(' ')); //true
                  
The string value above contains only empty spaces, hence, true is returned
Sample 4
  vdump(is_empty([])); //true
                  
The array value above is empty, hence, true is returned
Sample 5
  vdump(is_empty('10', [5, 10, 15])); //true
                  
The value above exist in the empty values array list, hence, true is returned
Sample 6
  vdump(is_empty('10', [2, 4, 6])); //false
                  
The value above does not exist in the empty values array list, hence, false is returned