Posted by Hero Wanders on 08/22/05 18:43
Hello!
> Well, that's the beauty of writing your own isEmpty()...you can have it
> do whatever you want. You could simulate PHP's empty() behavior pretty
> easily:
>
> function isEmpty($value) {
> return (strlen($value) == 0 || is_null($value) || $value == 0);
> }
If you want to emulate PHP empty()'s behaviour completely (and only
then) you should use
function isEmpty($value) {
return empty($value);
}
I assume this is faster than doing the checks yourself.
Greetings,
Hero
Navigation:
[Reply to this message]
|