|
For this you need to describe empty in your definition of it. From what I gather, you do not consider a space delimited string to be empty (and nor should you as it is not empty), so you would use the empty() function for that. Empty is true so long as the item it is given equates to false, so that will be false, 0, 0.0, "", "0", array(), null and uninstantiated object properties.
Assuming that 0 is never valid and you cannot possibly end up with spaces than empty is sufficient. Or you can never convert it to a string and retain it as an array and use the empty or count on the array instead. Arrays are far more useful than a string anyways.
|