Hi,

> From: a...@ajf.me>
> * I assume Thomas actually meant “where if any arguments passed in are 
> considered empty, then *true* is returned”, i.e. (empty($a) || empty($b) || 
> empty($c))
> 
> Sorry for the confusion.
> 
> I think the || behaviour is the most useful, as it’s the analogue of isset’s. 
> So !empty($a, $b, $c) would work similarly to isset($a, $b, $c), and 
> similarly, !isset($a, $b, $c) would work similarly to empty($a, $b, $c).
> 
> But that’s just my opinion. :)
> --
> Andrea Faulds
> http://ajf.me/

Yeah, my mistake. That's what I meant - empty will return TRUE if *any* of its 
arguments are considered empty, and FALSE otherwise. So the following two 
pieces of code are analogous:
# this:if (empty($a) || empty($b) || empty($c)) {// error here}
# is the same as this:if (empty($a, $b, $c)) {// error here}
# and this:if (!empty($a) && !empty($b) && !empty($c)) {// all good!}
# is the same as this:if (!empty($a, $b, $c)) {// all good!}
Sorry for the confusion :p
-Tom                                      

Reply via email to