On 18 September 2013 12:15, Igor Wiedler wrote:
>
> for is_* functions, this could easily be done with a higher-order "every"
> function. You pass a predicate and an array of values. It returns a boolean.
>
> Example:
>
> if (!every('is_int', $numbers)) {
> throw new \Inva
> function doStuffWithNumbers(...$numbers) {
> if (!is_int(...$numbers)) {
> throw new InvalidArgumentException('blah');
> ...
>
> Thoughts?
Returning bool in this case will make it impossible to respond with a
meaningful error message. Which of the provided arguments !is_int()?
Inst
2013/9/18 Igor Wiedler
> On Sep 18, 2013, at 11:53 AM, Leigh wrote:
>
> > Hi Internals.
> >
> > How do you feel about expanding the is_* functions to accept multiple
> > parameters similar to the way isset() already does?
> >
> > ...
> >
> > Thoughts?
>
> For isset() there is a good reason to do
On Sep 18, 2013, at 11:53 AM, Leigh wrote:
> Hi Internals.
>
> How do you feel about expanding the is_* functions to accept multiple
> parameters similar to the way isset() already does?
>
> ...
>
> Thoughts?
For isset() there is a good reason to do this, because the var might not exist
at a
Hi Internals.
How do you feel about expanding the is_* functions to accept multiple
parameters similar to the way isset() already does?
>From the manual: "If multiple parameters are supplied then isset() will
return TRUE only if all of the parameters are set. Evaluation goes from
left to right an