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

2015-02-13 Thread Benoit Schildnecht
Hey Tom, "Thomas Punt" a écrit dans le message de groupe de discussion Hey Benoit, From: bensor...@neuf.fr Hi, I agree, this behaviour should be extended to all the is_* functions if possible. I'm not sure we can do that for all of the is_* functions, since is_callable() accepts up to

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

2015-02-13 Thread Thomas Punt
Hey Benoit, > From: bensor...@neuf.fr > Hi, > > I agree, this behaviour should be extended to all the is_* functions if > possible. > I'm not sure we can do that for all of the is_* functions, since is_callable() accepts up to three arguments rather than taking only a single argument like t

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

2015-02-13 Thread Benoit Schildnecht
Hi, ""Sebastian B.-Hagensen"" a écrit dans le message de groupe de discussion : caojcv8yx7vohtd1ja2obdrntdzb0q1soyqdyhsar3vt2vgs...@mail.gmail.com... 2015-02-13 14:45 GMT+01:00 Thomas Punt : Hi Francois, From: franc...@tekwire.net> May I suggest to extend your proposal to is_null() with t

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

2015-02-13 Thread Thomas Punt
Hi, > Date: Fri, 13 Feb 2015 15:09:16 +0100 > From: sbj.ml.r...@gmail.com > > While I don't know how common such a usage is I'm certain that there > is a use case for it. However, just modifying a subset of the is_* > functions sounds like a bad idea. If such a change is applied it > should be do

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

2015-02-13 Thread Sebastian B.-Hagensen
Hi, 2015-02-13 14:45 GMT+01:00 Thomas Punt : > Hi Francois, > >> From: franc...@tekwire.net> >> May I suggest to extend your proposal to is_null() with the same logic ? > If we were to do the same with is_null(), then would it not be best to do it > with all the is_*() functions? I would be more

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

2015-02-13 Thread Thomas Punt
Hi Francois, > From: franc...@tekwire.net> > May I suggest to extend your proposal to is_null() with the same logic ? If we were to do the same with is_null(), then would it not be best to do it with all the is_*() functions? I would be more than happy to cater for those functions as well, thoug

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

2015-02-13 Thread François Laupretre
> De : Michael Wallner [mailto:mike.php@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

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

2015-02-13 Thread Michael Wallner
On 13/02/15 12:31, Andrea Faulds wrote: > >> On 13 Feb 2015, at 11:16, Andrea Faulds wrote: >> >> Hey, >> >>> On 13 Feb 2015, at 07:28, Michael Wallner wrote: >>> >>> On 12/02/15 19:55, Thomas Punt wrote: >>> I'd like to propose to make empty() a variadic, where if any arguments p

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

2015-02-13 Thread Thomas Punt
Hi Reeze, > From: re...@php.net > > For example: echo $a, $b, $c, & empty($a, $b, $c), they are treated equal, > > if the empty() means if any one of them is empty then result is TRUE, the > advantage of it disappeared: > > if (empty($a, $b, $c)) { > // you might want to check it again. > if (e

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

2015-02-13 Thread Thomas Punt
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 iss

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

2015-02-13 Thread reeze
Hi, On 13 February 2015 at 19:31, Andrea Faulds wrote: > > > On 13 Feb 2015, at 11:16, Andrea Faulds wrote: > > > > Hey, > > > >> On 13 Feb 2015, at 07:28, Michael Wallner wrote: > >> > >> On 12/02/15 19:55, Thomas Punt wrote: > >> > >>> I'd like to propose to make empty() a variadic, where if

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

2015-02-13 Thread Andrea Faulds
> On 13 Feb 2015, at 11:16, Andrea Faulds wrote: > > Hey, > >> On 13 Feb 2015, at 07:28, Michael Wallner wrote: >> >> On 12/02/15 19:55, Thomas Punt wrote: >> >>> I'd like to propose to make empty() a variadic, where if any >>> arguments passed in are considered empty, then false is returned

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

2015-02-13 Thread Andrea Faulds
Hey, > On 13 Feb 2015, at 07:28, Michael Wallner wrote: > > On 12/02/15 19:55, Thomas Punt wrote: > >> I'd like to propose to make empty() a variadic, where if any >> arguments passed in are considered empty, then false is returned > > Should that read "if any arguments passed in are considere

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

2015-02-12 Thread Michael Wallner
On 12/02/15 19:55, Thomas Punt wrote: > I'd like to propose to make empty() a variadic, where if any > arguments passed in are considered empty, then false is returned Should that read "if any arguments passed in are considered *NOT* empty, then false is returned"? -- Regards, Mike -- PHP In

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

2015-02-12 Thread Thomas Punt
Hi Kris, > Date: Thu, 12 Feb 2015 11:21:40 -0800 > From: kris.cr...@gmail.com > To: tp...@hotmail.co.uk > CC: internals@lists.php.net > Subject: Re: [PHP-DEV] [DISCUSSION] Make empty() a Variadic > > I'd say go ahead and draft an RFC with all the details of your prop

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

2015-02-12 Thread Kris Craig
On Thu, Feb 12, 2015 at 10:55 AM, Thomas Punt wrote: > Hello PHP Internals! > I'd like to propose to make empty() a variadic, where if any arguments > passed in are considered empty, then false is returned - otherwise return > true. > My reasoning for wanting this feature is as follows:1)It's a c