Re: [RFC] Make empty() a Variadic
| From: | Leigh | Date: | Sat, 21 Feb 2015 06:20:35 +0000 |
| Subject: | Re: [RFC] Make empty() a Variadic | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83379@lists.php.net to get a copy of this message | ||
Hey Tom,
Patch looks solid (basically the same as the isset logic with OR
instead of AND). I think it's fairly sane to have this feature because
it compliments isset functionality (although I dislike "empty"
personally - consistency is nice)
No RFC would be complete without a complaint about naming.
"empty_expressions" ... I'll give you an empty expression!
But overall +1 on functionality and patch.
Cheers!
Leigh.
On 21 February 2015 at 05:11, Thomas Punt <tpunt@hotmail.co.uk> wrote:
> Hello Internals!
> The following RFC aims to make empty() have a variable arity: T�]¤
> êû›—µÄ]Ÿ}https://wiki.php.net/rfc/variadic_empty. This is a simple feature that
> enables for a short-hand notation of checking multiple expressions for emptiness (which is a pretty
> common thing to do).
> I have avoided including the is_*() functions into this RFC because my main priority is to get
> this particular feature into PHP 7.0 before feature freeze. Provided I have some free time over the
> next week, I'll write up another RFC + patch to cover the is_*() functions.
> Thanks,Tom