On Tue, Feb 12, 2019 at 4:30 AM Côme Chilliet wrote:
> My first thought was that this must already exists under another name,
> but it seems that none of array_map, array_walk or array_reduce allows to
do that easily.
> (That is, in a more readable way than the boolean operator string,
otherwise i
Le lundi 11 février 2019, 08:59:17 CET Levi Morrison a écrit :
> My position is the same: pushing the variadic behavior into the
> functions means that each function needs to pick `||` or `&&`
> behavior, both of which are useful. I would rather see more
> descriptive function names, such as `all_o
On Mon, Feb 11, 2019 at 9:59 AM Levi Morrison wrote:
> My position is the same: pushing the variadic behavior into the
> functions means that each function needs to pick `||` or `&&`
> behavior, both of which are useful.
>
Additionally, I recall from that thread (or a similar one on the same
topic
On Mon, Feb 11, 2019 at 11:35 AM Levi Morrison wrote:
> >> I recognize that there is one downside, which is that lazy evaluation
> >> is lost, but generally don't see it to be an issue in these specific
> >> cases.
> >>
> > Lazy evaluation doesn't have to be lost if the all_of and any_of
> functi
On 11.02.2019 at 16:59, Levi Morrison wrote:
> My position is the same: pushing the variadic behavior into the
> functions means that each function needs to pick `||` or `&&`
> behavior, both of which are useful. I would rather see more
> descriptive function names, such as `all_of` or `any_of`:
>
>> I recognize that there is one downside, which is that lazy evaluation
>> is lost, but generally don't see it to be an issue in these specific
>> cases.
>>
> Lazy evaluation doesn't have to be lost if the all_of and any_of functions
> are written correctly. all_of will return false as soon as on
On Mon, Feb 11, 2019 at 10:59 AM Levi Morrison wrote:
> On Mon, Feb 11, 2019 at 8:39 AM Woortmann, Enno
> wrote:
> >
> > Hi internals,
> >
> > as I reviewed a bunch of code for handling data from different sources
> > (eg. json) in the last days I stumbled over code like this multiple
> times:
>
On Mon, Feb 11, 2019 at 8:39 AM Woortmann, Enno wrote:
>
> Hi internals,
>
> as I reviewed a bunch of code for handling data from different sources
> (eg. json) in the last days I stumbled over code like this multiple times:
>
>
> if (!(is_numeric($input['example1']) && is_numeric($input['example2
Hi internals,
as I reviewed a bunch of code for handling data from different sources
(eg. json) in the last days I stumbled over code like this multiple times:
if (!(is_numeric($input['example1']) && is_numeric($input['example2']))) {
if (!is_numeric($input['example1'] || !is_numeric($input['