I have several strings which may or may not be empty. If any of them are non-empty, a mysql insertion should be called.
I've coded it simply, but was thinking about the fastest method of testing if ANY of them is non-empty.
$a = something;
$b = something;
$c = something;
Options
- if($a!="" || $b!="" || $c!="")
- if($a.$b.$c!="")
- if(strlen($a) || strlen($b) || strlen($c))
- if(strlen($a)>0 || strlen($b)>0 || strlen($c)>0)
- if(strlen($a.$b.$c))
- if(strlen($a.$b.$c)>0)