RE: [PHP-DEV] [DISCUSSION] Make empty() a Variadic

From: Date: Fri, 13 Feb 2015 13:29:07 +0000
Subject: RE: [PHP-DEV] [DISCUSSION] Make empty() a Variadic
Groups: php.internals 
Request: Send a blank email to internals+get-82611@lists.php.net to get a copy of this message
> De : Michael Wallner [mailto:mike.php.net@gmail.com] De la part de Michael Wallner > > > 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. :) > > Okay, while I think it has a tiny WTF attached, because isset() has ALL > semantics and empty() would have ANY semantics, it's probably useful > only in that way. Agreed. Adds an ambiguity but would be useless otherwise. May I suggest to extend your proposal to is_null() with the same logic ? François

« previous php.internals (#82611) next »