I think the idea comes from a good place, but the actual, practical
usefulness of it is so low that the availability of workaround negates even
the very small amount of effort it would take to create (and maintain!)
shadow functions for the language constructs.

array_filter($arr, function($val) { echo $val; });   <--- done.  No
gymnastics needed.


On Fri, Jul 19, 2013 at 8:53 PM, Tjerk Anne Meesters <datib...@php.net>wrote:

> On Sat, Jul 20, 2013 at 1:32 AM, Arpad Ray <array...@gmail.com> wrote:
>
> > On Fri, Jul 19, 2013 at 6:28 PM, Daniel Lowrey <rdlow...@gmail.com>
> wrote:
> >
> > > While it works, it somewhat obscures what you're trying to accomplish
> in
> > > the code. The maintainability nightmare alone may be enough to
> > > counterbalance any benefits. Then again, who needs
> > > readability/maintainability when you can write hopelessly impenetrable
> > > code? :)
> > >
> > >
> > Yes, quite, let's just pretend this thread never happened ;)
> >
>
> Let's also pretend I didn't suggest to add a third argument to
> array_filter();
>
> array_filter($arr, 'is_null', PHP_FILTER_INVERT);
>
> ;-)
>
>
> >
> > Arpad
> >
>
>
>
> --
> --
> Tjerk
>

Reply via email to