Re: Inconsistency of empty() and isset() ?

From: Date: Sun, 16 Apr 2006 23:26:49 +0000
Subject: Re: Inconsistency of empty() and isset() ?
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-22803@lists.php.net to get a copy of this message
On 4/17/06, Lukas Smith <lsmith@php.net> wrote: > Derick Rethans wrote: > > On Sat, 15 Apr 2006 itrebal@gmail.com wrote: > > > >> The following is a direct excerpt from the PHP manual on empty, and isset: > >> bool *empty* ( mixed var ) > >> bool *isset* ( mixed var [, mixed var [, ...]] ) > >> Is there a reason empty does not allow multiple variables at a time, as > >> isset? Was there thought behind it, or is it just an inconsistency? > > > > There is a thought about it, and that is that we could not decide > > whether it should be an AND or an OR test between the different > > parameters. > > well it seems to be AND for isset() .. which is probably its closest > "sibiling" .. so the obvious call when going for consistency would be to > AND in empty() as well .. Indeed, especially as everyone will tell you that isset and empty are equivalent. --Pierre

« previous php.internals (#22803) next »